From 9ceed79cf32c896f8a998399bf1b296506b2cd4a Mon Sep 17 00:00:00 2001
From: dujinkim <dujin.kim@dtsolution.co.kr>
Date: Tue, 8 Apr 2025 03:08:19 +0000
Subject: 로그인 및 미들웨어 처리. 구조 변경
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 db/migrations/0095_odd_slayback.sql | 55 -------------------------------------
 1 file changed, 55 deletions(-)
 delete mode 100644 db/migrations/0095_odd_slayback.sql

(limited to 'db/migrations/0095_odd_slayback.sql')

diff --git a/db/migrations/0095_odd_slayback.sql b/db/migrations/0095_odd_slayback.sql
deleted file mode 100644
index bdea91f0..00000000
--- a/db/migrations/0095_odd_slayback.sql
+++ /dev/null
@@ -1,55 +0,0 @@
-DROP VIEW "public"."contracts_detail_view";--> statement-breakpoint
-CREATE VIEW "public"."contracts_detail_view" AS (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 (
-          SELECT 1 
-          FROM "contract_envelopes" 
-          WHERE "contract_envelopes"."contract_id" = "contracts"."id"
-        ) as "has_signature", COALESCE((
-          SELECT json_agg(
-            json_build_object(
-              'id', ci.id,
-              'itemId', ci.item_id,
-              'description', ci.description,
-              'quantity', ci.quantity,
-              'unitPrice', ci.unit_price,
-              'taxRate', ci.tax_rate,
-              'taxAmount', ci.tax_amount,
-              'totalLineAmount', ci.total_line_amount,
-              'remark', ci.remark,
-              'createdAt', ci.created_at,
-              'updatedAt', ci.updated_at
-            )
-          )
-          FROM "contract_items" AS ci
-          WHERE ci.contract_id = "contracts"."id"
-        ), '[]') as "items", COALESCE((
-          SELECT json_agg(
-            json_build_object(
-              'id', ce.id,
-              'envelopeId', ce.envelope_id,
-              'documentId', ce.document_id,
-              'envelopeStatus', ce.envelope_status,
-              'fileName', ce.file_name,
-              'filePath', ce.file_path,
-              'createdAt', ce.created_at,
-              'updatedAt', ce.updated_at,
-              'signers', (
-                SELECT json_agg(
-                  json_build_object(
-                    'id', cs.id,
-                    'vendorContactId', cs.vendor_contact_id,
-                    'signerType', cs.signer_type,
-                    'signerEmail', cs.signer_email,
-                    'signerName', cs.signer_name,
-                    'signerPosition', cs.signer_position,
-                    'signerStatus', cs.signer_status,
-                    'signedAt', cs.signed_at
-                  )
-                )
-                FROM "contract_signers" AS cs
-                WHERE cs.envelope_id = ce.id
-              )
-            )
-          )
-          FROM "contract_envelopes" AS ce
-          WHERE ce.contract_id = "contracts"."id"
-        ), '[]') as "envelopes" from "contracts" left join "projects" on "contracts"."project_id" = "projects"."id" left join "vendors" on "contracts"."vendor_id" = "vendors"."id");
\ No newline at end of file
-- 
cgit v1.2.3

