zioinfo-mail/projects/testcase-py-api/app/models/employee.py
DESKTOP-TKLFCPR\ython e228faabf5 feat(itsm): G-1~G-12 확장 기능 + 하네스/봇/설치스크립트 구현
G-1: 메신저 Webhook Relay + _send_to_room 실제 httpx 호출 구현
G-2: POST /api/tasks/bulk SR 대량작업 엔드포인트 (최대 100건)
G-3: 라이선스 만료 알림 스케줄러 (매일 09:00 KST)
G-4: 체험판 upgrade_banner 필드 + license.py 배너 로직
G-5: core/auto_rca.py + incidents/problem auto-rca 엔드포인트
G-6: core/deploy_impact.py + vibe impact-analysis 엔드포인트
G-7: core/ticket_classifier.py + SR 생성 시 AI 분류 + ai-suggestion API
G-8: VulnPatchRecord 모델 + vuln_scan 패치추적 4개 엔드포인트
G-9: core/jira_sync.py + gateway Jira/Confluence 연동 엔드포인트
G-10: core/push_notify.py + routers/push.py + PushSubscription 모델
G-11: approvals 다중승인 (위임/서명/기한초과/마감연장)
G-12: alembic.ini + migrations/ + cicd/migrate_to_postgres.sh

하네스: guardia-orchestrator 확장기능 Phase 반영
봇명령어: /sr /status /license /bulk 슬래시 명령어 추가
설치스크립트: setup/ (Ubuntu, CentOS, RHEL, Windows) --test 옵션 포함

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-29 18:18:52 +09:00

23 lines
1.0 KiB
Python

"""직원 모델 — 코드 리뷰 testcase: 보안 취약점 포함"""
from sqlalchemy import Column, Integer, String, Date, Numeric, Boolean, DateTime
from sqlalchemy.sql import func
from app.models.base import Base
class Employee(Base):
__tablename__ = "tb_employee"
id = Column(Integer, primary_key=True, index=True)
emp_no = Column(String(20), unique=True, nullable=False, index=True)
name = Column(String(100), nullable=False)
department = Column(String(50))
position = Column(String(50))
email = Column(String(200), unique=True)
phone = Column(String(20))
hire_date = Column(Date)
salary = Column(Numeric(12, 2)) # 보안이슈: 급여 컬럼 암호화 없음
password = Column(String(255)) # 보안이슈: 평문 저장 (hash 미적용)
is_active = Column(Boolean, default=True)
created_at = Column(DateTime, server_default=func.now())
updated_at = Column(DateTime, server_default=func.now(), onupdate=func.now())