Calendar P2

Tables (11)

auth_user

  • id — varchar(36) — Primary key — NOT NULL — 로그인 식별자(사람 단위)
  • email — varchar(128) — NOT NULL — 로그인 이메일(전역 유니크)
  • name — varchar(64) — NOT NULL — 이름
  • status — enum('NORMAL', 'PENDING', 'DORMANT', 'BLOCK', 'DELETE') — NOT NULL — 계정 상태
  • last_login_time — timestamp — NOT NULL — 마지막 로그인 시각
  • create_time — datetime(6) — NOT NULL — 생성 시각
  • update_time — datetime(6) — NOT NULL — 수정 시각
  • delete_time — datetime — 삭제 시각(soft delete)

calendar_account

  • id — varchar(16) — Primary key — NOT NULL — nanoid(16) PK
  • id (auth_user_id) — varchar(36) — Foreign key → auth_user.id — NOT NULL — 로그인 식별자(사람 단위)
  • provider — enum('google') — NOT NULL — 캘린더 프로바이더
  • provider_account_id — varchar(255) — NOT NULL — 프로바이더 계정 고유 ID (Google sub)
  • email — varchar(320) — NOT NULL — 연동 계정 이메일
  • access_token_cipher — text — NOT NULL — 암호화된 access token
  • refresh_token_cipher — text — NOT NULL — 암호화된 refresh token
  • access_token_expires_at — datetime(6) — NOT NULL — access token 만료 시각
  • scope — varchar(512) — NOT NULL — 동의받은 OAuth scope
  • status — enum('active', 'token_expired', 'revoked_by_provider', 'error') — NOT NULL — 연동 상태
  • last_error_code — varchar(64) — 마지막 동기화 에러 코드
  • last_error_at — datetime(6) — 마지막 에러 발생 시각
  • sync_token — varchar(2048) — Google incremental sync token
  • notify_horizon_synced_at — datetime(6) — 알림 윈도우(now+7d) 마지막 동기화 시각
  • synced_through_at — datetime(6) — 점진 동기화 완료 시점
  • watch_channel_id — varchar(64) — Google events.watch 채널 ID
  • watch_resource_id — varchar(255) — watch 리소스 ID
  • watch_token — varchar(128) — X-Goog-Channel-Token 검증용 secret
  • watch_expires_at — datetime(6) — watch 채널 만료 시각
  • create_time — datetime(6) — NOT NULL
  • update_time — datetime(6) — NOT NULL
  • delete_time — datetime(6) — soft delete

calendar_account_log

  • id — bigint — Primary key — NOT NULL — 로그 ID
  • event_status — enum('linked', 'relinked', 'unlinked') — NOT NULL — 계정 이벤트(연동/재연동/해제)
  • auth_user_id — varchar(36) — NOT NULL — 로그인 계정 ID
  • workspace_user_id — varchar(36) — 워크스페이스 사용자 ID
  • calendar_account_id — varchar(16) — NOT NULL — 캘린더 계정 ID
  • provider — enum('google') — NOT NULL — 캘린더 제공자
  • platform — varchar(16) — 요청 플랫폼
  • create_time — datetime(6) — NOT NULL — 기록 시각

calendar_account_visibility (calendar_account_link)

  • id — varchar(16) — Primary key — NOT NULL — 캘린더 계정 노출 설정 ID
  • id (calendar_account_id) — varchar(16) — Foreign key → calendar_account.id — NOT NULL — 캘린더 계정 ID
  • id (user_id) — varchar(36) — Foreign key → user.id — NOT NULL — 워크스페이스별 유저 프로필 id (리소스 소유 단위)
  • enabled — tinyint — NOT NULL — 해당 워크스페이스 사용자에게 노출 여부
  • create_time — datetime(6) — NOT NULL — 생성 시각
  • update_time — datetime(6) — NOT NULL — 수정 시각

calendar_event

  • id — varchar(16) — Primary key — NOT NULL — nanoid(16) PK
  • calendar_account_id — varchar(16) — Foreign key → calendar_account.id — NOT NULL — calendar_account.id
  • provider_calendar_id — varchar(255) — NOT NULL — 프로바이더 캘린더 ID (primary 등)
  • provider_event_id — varchar(1024) — NOT NULL — 프로바이더 이벤트 ID
  • provider_i_cal_uid — varchar(1024) — NOT NULL — iCal UID (계정 간 동일 일정 식별)
  • provider_etag — varchar(255) — NOT NULL — 프로바이더 버전 태그
  • recurring_master_event_id — varchar(1024) — 반복 일정 마스터 이벤트 ID
  • recurrence_rule — text — RRULE 문자열
  • is_all_day — tinyint — NOT NULL — 종일 일정 여부
  • start_at — datetime(6) — NOT NULL — 시작 시각 (UTC)
  • end_at — datetime(6) — NOT NULL — 종료 시각 (UTC)
  • time_zone — varchar(64) — NOT NULL — 원본 일정 타임존
  • title — varchar(1024) — NOT NULL — 제목
  • description — text — 설명
  • location — varchar(2048) — 장소
  • visibility — enum('default', 'public', 'private') — NOT NULL — 공개 범위
  • status — enum('confirmed', 'tentative', 'cancelled') — NOT NULL — 일정 상태
  • event_type — enum('default', 'birthday', 'holiday', 'focusTime', 'outOfOffice', 'workingLocation') — NOT NULL — Google eventType
  • is_excluded — tinyint — NOT NULL — 서비스 처리 대상 제외 여부
  • exclude_reason — enum('by_event_type', 'team_shared_calendar', 'cancelled') — 제외 사유
  • is_from_team_shared_calendar — tinyint — NOT NULL — 팀 공유 캘린더 출처 여부
  • organizer_email — varchar(320) — 주최자 이메일
  • attendees_count — int — NOT NULL — 참석자 수
  • provider_updated_at — datetime(6) — NOT NULL — 프로바이더 기준 마지막 수정 시각
  • create_time — datetime(6) — NOT NULL
  • update_time — datetime(6) — NOT NULL
  • delete_time — datetime(6) — soft delete

calendar_event_alarm

  • id — varchar(16) — Primary key — NOT NULL — 캘린더 이벤트 알림 ID
  • id (calendar_event_id) — varchar(16) — Foreign key → calendar_event.id — NOT NULL — 캘린더 이벤트 ID
  • user_id — varchar(36) — NOT NULL — 알림 대상 워크스페이스 사용자 ID
  • schedule_time — datetime(6) — NOT NULL — 알림 예약 시각
  • cloud_task_name — varchar(512) — Cloud Tasks task name
  • revision — int — NOT NULL — 예약 버전
  • status — enum('pending', 'scheduled', 'dispatching', 'sent', 'skipped', 'failed') — NOT NULL — 알 림 상태
  • create_time — datetime(6) — NOT NULL — 생성 시각
  • update_time — datetime(6) — NOT NULL — 수정 시각

calendar_event_preference

  • id — varchar(16) — Primary key — NOT NULL
  • id (calendar_account_link_id) — varchar(16) — Foreign key → calendar_account_visibility.id — NOT NULL — 캘린더 계정 노출 설정 ID
  • target_provider_event_id — varchar(1024) — NOT NULL
  • folder_id — varchar(255) — 저장 폴더 ID
  • Field (is_notification_enabled) — boolean
  • Field2 (notification_minutes_before) — int — 캘린더 N분 전 알림 (0, 1, 5)
  • create_time — datetime(6) — NOT NULL
  • update_time — datetime(6) — NOT NULL

calendar_sync_log

  • id — bigint — Primary key — NOT NULL — 로그 ID
  • auth_user_id — varchar(36) — NOT NULL — 로그인 계정 ID
  • calendar_account_id — varchar(16) — NOT NULL — 캘린더 계정 ID
  • provider — enum('google') — NOT NULL — 캘린더 제공자
  • sync_type — enum('initial', 'incremental', 'window') — NOT NULL — 동기화 종류(초기/변경분/구간)
  • result — enum('succeeded', 'failed') — NOT NULL — 동기화 결과
  • fetched_count — int — Google에서 가져온 일정 수
  • visible_event_count — int — 노출 가능 일정 수
  • cancelled_count — int — 취소 일정 수
  • error_code — varchar(64) — 실패 에러 코드
  • create_time — datetime(6) — NOT NULL — 기록 시각

folder

  • id — varchar(255) — Primary key — NOT NULL
  • user_id — varchar(36) — NOT NULL
  • delete_time — datetime(6)

user

  • id — varchar(36) — Primary key — NOT NULL — 워크스페이스별 유저 프로필 id (리소스 소유 단위)
  • auth_user_id — varchar(36) — Foreign key → auth_user.id — 소속 auth_user(사람) FK
  • name — varchar(64) — NOT NULL — 이름
  • email — varchar(128) — NOT NULL — 이메일(유니크 제거됨 - RemoveUserEmailUnique)
  • status — enum('NORMAL', 'PENDING', 'DORMANT', 'BLOCK', 'DELETE') — NOT NULL — 상태
  • marketing_agreement — tinyint — NOT NULL — 마케팅 동의
  • data_agreement — tinyint — NOT NULL — 서비스 품질 향상 동의
  • personal_data_agreement — tinyint — NOT NULL — (deprecated) 개인정보처리방침 동의
  • profile_background — enum('SECONDARY_ROSE', 'WARNING', 'SUCCESS', 'PRIMARY', 'SECONDARY_VIOLET') — NOT NULL — 프로필 배경색
  • last_login_time — timestamp — NOT NULL — 마지막 로그인 시각
  • create_time — datetime(6) — NOT NULL — 생성 시각
  • update_time — datetime(6) — NOT NULL — 수정 시각
  • delete_time — datetime — 삭제 시각(soft delete)

user_notification_option

  • id — int — Primary key — NOT NULL — 설정 ID
  • id (user_id) — varchar(36) — Foreign key → user.id — NOT NULL — 워크스페이스별 유저 프로필 id (리소스 소유 단위)
  • type — enum('EMAIL', 'MOBILE') — NOT NULL — 알림 채널 (이메일/모바일)
  • category — enum('MARKETING', 'TRANSCRIPT', 'LONG_SUMMARY', 'REVIEW_HABIT') — NOT NULL — 알림 카테고리
  • value — tinyint — NOT NULL — 수신 동의 여부 (boolean)
  • create_time — datetime(6) — NOT NULL — 생성 시각
  • update_time — datetime(6) — NOT NULL — 수정 시각