fix(esn): pom.xml finalName 패턴 수정 + schema.sql esn_audit_log 테이블 추가

- pom.xml: finalName esn → esn-1.0.0 (deploy_server.py esn-*.jar 패턴 일치)
- schema.sql: esn_audit_log 테이블 추가 (감사 로그)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
DESKTOP-TKLFCPR\ython 2026-06-16 01:18:48 +09:00
parent 969fcd7284
commit 5774735d92
2 changed files with 18 additions and 1 deletions

View File

@ -72,6 +72,6 @@
</configuration> </configuration>
</plugin> </plugin>
</plugins> </plugins>
<finalName>esn</finalName> <finalName>esn-1.0.0</finalName>
</build> </build>
</project> </project>

View File

@ -260,3 +260,20 @@ INSERT INTO esn_product (tenant_code, store_id, product_code, product_name, cate
SELECT 'EMART', s.id, 'P-001', '신라면', '라면/면류', 850, 800 SELECT 'EMART', s.id, 'P-001', '신라면', '라면/면류', 850, 800
FROM esn_store s WHERE s.store_code = 'EM-001' LIMIT 1 FROM esn_store s WHERE s.store_code = 'EM-001' LIMIT 1
ON CONFLICT DO NOTHING; ON CONFLICT DO NOTHING;
-- ── 감사 로그 ─────────────────────────────────────────────────────────────────
CREATE TABLE IF NOT EXISTS esn_audit_log (
id BIGSERIAL PRIMARY KEY,
tenant_code VARCHAR(20),
username VARCHAR(200),
action VARCHAR(200) NOT NULL,
resource VARCHAR(200),
resource_id VARCHAR(100),
detail TEXT,
ip_address VARCHAR(50),
user_agent VARCHAR(500),
success BOOLEAN DEFAULT TRUE,
created_at TIMESTAMP DEFAULT NOW()
);
CREATE INDEX IF NOT EXISTS idx_audit_created ON esn_audit_log(created_at DESC);
CREATE INDEX IF NOT EXISTS idx_audit_tenant ON esn_audit_log(tenant_code, created_at DESC);