11111

Tables (19)

blacklisted_tokens

  • access_token — VARCHAR(512) — Blacklisted Access Token
  • status — VARCHAR(50) — Value always "blacklisted"
  • ttl_milliseconds — BIGINT — Expiration time (ms)

chat_bot_message

  • id — BIGINT — Synthetic ID (RDB Key)
  • conversation_oid — VARCHAR(255) — NOT NULL — FK to conversation.id
  • message_id — BIGINT — KakaoWork Message ID
  • content — TEXT — Message Content
  • created_at — DATETIME — Message Creation Timestamp

chat_bot_response

  • id — BIGINT — Synthetic ID (RDB Key)
  • chat_bot_message_id — BIGINT — NOT NULL — FK to chat_bot_message.id
  • response_id — VARCHAR(255) — Bot Response ID
  • content — TEXT — Bot Response Content
  • response_time — DOUBLE — Response Time (ms)

conversation

  • id — VARCHAR(255) — MongoDB ObjectId
  • conversation_id — BIGINT — Conversation ID
  • user_id — BIGINT — User ID
  • user_name — VARCHAR(255) — User Name
  • created_at — DATETIME — Creation Timestamp

email_auth_codes

  • email — VARCHAR(255) — User Email
  • verification_code — VARCHAR(10) — 6-digit verification code
  • ttl_minutes — INT — Expiration time (minutes, default: 5)

feedback

  • feedback_id — BIGINT — Primary key — NOT NULL — 피드백 PK
  • content — MEDIUMTEXT — NOT NULL — 내용
  • bot_message_id — BIGINT — NOT NULL — 관련 메시지ID
  • tag_id — BIGINT — Foreign key → tag.tag_id — NOT NULL — 태그ID
  • reaction — ENUM('LIKE', 'DISLIKE') — 리액션
  • question — MEDIUMTEXT — NOT NULL — 질문
  • response — MEDIUMTEXT — NOT NULL — 답변
  • created_at — DATETIME — NOT NULL
  • updated_at — DATETIME — NOT NULL
  • deleted_at — DATETIME

file_upload_queue

  • queue_index — INT — Index in the Redis List
  • task_json — TEXT — JSON representation of FileUploadTask

file_version

  • file_version_id — BIGINT — Primary key — NOT NULL — 파일 버전 PK
  • file_id — BIGINT — Foreign key → files.file_id — NOT NULL — 파일ID
  • file_name — VARCHAR(255) — NOT NULL — 파일 이름
  • version_no — INT — 버전 번호
  • size_bytes — BIGINT — 파일 크기
  • storage_path — VARCHAR(255) — 저장 경로
  • created_at — DATETIME — NOT NULL
  • updated_at — DATETIME — NOT NULL
  • deleted_at — DATETIME

files

  • file_id — BIGINT — Primary key — NOT NULL — 파일 PK
  • name — VARCHAR(255) — NOT NULL — 파일명
  • file_type — VARCHAR(255) — NOT NULL — 파일유형
  • size_bytes — BIGINT — 파일 크기
  • uploader_id — BIGINT — Foreign key → users.user_id — NOT NULL — 업로더
  • status — ENUM('ACTIVE', 'PROCESSING', 'ERROR') — 상태
  • tag_id — BIGINT — Foreign key → tag.tag_id — NOT NULL — 태그ID
  • created_at — DATETIME — NOT NULL
  • updated_at — DATETIME — NOT NULL
  • deleted_at — DATETIME

guard_metric

  • metric_id — BIGINT — Primary key — NOT NULL — 가드레일 PK
  • organization_id — BIGINT — Foreign key → organization.organization_id — NOT NULL — 조직ID
  • type — ENUM('INSULT', 'SEXUAL', 'ILLEGAL', 'POLITIC', 'SECURITY', 'VIOLENCE') — NOT NULL — 타입
  • count — INT — NOT NULL — 카운트
  • created_at — DATETIME — NOT NULL
  • updated_at — DATETIME — NOT NULL
  • deleted_at — DATETIME

last_logins

  • email — VARCHAR(255) — User Email
  • last_login_time — DATETIME — Last login timestamp
  • ttl_seconds — INT — Expiration time (seconds)

metrics

  • metric_id — BIGINT — Primary key — NOT NULL — 메트릭 PK
  • organization_id — BIGINT — Foreign key → organization.organization_id — NOT NULL — 조직ID
  • user_count — BIGINT — 이용자 수
  • call_count — BIGINT — 호출 횟수
  • feedback_good — BIGINT — 좋아요 수
  • feedback_bed — BIGINT — 싫어요 수
  • file_count — BIGINT — 파일 수
  • token_use — BIGINT — 토큰 사용량
  • token_cost — DECIMAL(20, 12) — 토큰 비용
  • avg_response_time — DOUBLE — 평균 응답 시간
  • created_at — DATETIME — NOT NULL
  • updated_at — DATETIME — NOT NULL
  • deleted_at — DATETIME

organization

  • organization_id — BIGINT — Primary key — NOT NULL — 조직 PK
  • name — VARCHAR(255) — 조직명
  • email_domain — VARCHAR(255) — 조직 이메일 도메인(example.com)
  • created_at — DATETIME — NOT NULL — 생성 일시
  • updated_at — DATETIME — NOT NULL — 수정 일시
  • deleted_at — DATETIME — 삭제 일시

processing_tasks

  • job_id — VARCHAR(255) — Key: processing:{jobId}
  • task_json — TEXT — JSON representation of FileUploadTask
  • ttl_seconds — INT — Expiration time in seconds (Default: 3600)

refresh_tokens

  • refresh_token — VARCHAR(512) — Refresh Token string
  • user_id — BIGINT — Associated User ID
  • ttl_seconds — INT — Expiration time (seconds, default: 1209600)

signup_temp_tokens

  • temp_token — VARCHAR(255) — Temporary Token UUID
  • email — VARCHAR(255) — User Email associated with the token
  • ttl_minutes — INT — Expiration time (minutes, default: 10)

tag

  • tag_id — BIGINT — Primary key — NOT NULL — 태그 PK
  • name — VARCHAR(255) — NOT NULL — 태그명
  • organization_id — BIGINT — Foreign key → organization.organization_id — NOT NULL — 조직ID
  • created_at — DATETIME — NOT NULL
  • updated_at — DATETIME — NOT NULL
  • deleted_at — DATETIME

tag_metrics

  • metrics_id — BIGINT — Primary key — NOT NULL — 집계ID
  • tag_id — BIGINT — Foreign key → tag.tag_id — NOT NULL — 태그ID
  • question_count — INT — NOT NULL — 질문수
  • created_at — DATETIME — NOT NULL
  • updated_at — DATETIME — NOT NULL
  • deleted_at — DATETIME

users

  • user_id — BIGINT — Primary key — NOT NULL — 사용자 PK
  • organization_id — BIGINT — Foreign key → organization.organization_id — 조직ID
  • department — VARCHAR(255) — NOT NULL — 부서
  • email — VARCHAR(190) — 이메일
  • name — VARCHAR(100) — 이름
  • password — VARCHAR(255) — 비밀번호 해시
  • position — VARCHAR(255) — 직급
  • role — ENUM('MASTER', 'NORMAL') — 권한
  • is_approved — BOOLEAN — NOT NULL — 승인 상태
  • created_at — DATETIME — NOT NULL
  • updated_at — DATETIME — NOT NULL
  • deleted_at — DATETIME