tlisx

Tables (15)

_prisma_migrations

  • id — character varying(36) — Primary key — NOT NULL
  • checksum — character varying(64) — NOT NULL
  • finished_at — timestamp with time zone
  • migration_name — character varying(255) — NOT NULL
  • logs — text
  • rolled_back_at — timestamp with time zone
  • started_at — timestamp with time zone — NOT NULL
  • applied_steps_count — integer — NOT NULL

app_users

  • id — bigint — Primary key — NOT NULL
  • auth_user_id — uuid
  • email — text — NOT NULL
  • name — text — NOT NULL
  • phone — text
  • role — public.user_role — NOT NULL
  • franchise_id — bigint — Foreign key → franchises.id
  • status — text — NOT NULL
  • created_at — timestamp(6) with time zone — NOT NULL

assignments (담당 가맹점 배정 이력)

  • id — bigint — Primary key — NOT NULL
  • order_id — bigint — Foreign key → orders.id — NOT NULL
  • franchise_id — bigint — Foreign key → franchises.id — NOT NULL
  • claim_type — public.claim_kind — NOT NULL
  • claimed_by — text
  • lock_version — integer — NOT NULL
  • status — text — NOT NULL
  • claimed_at — timestamp(6) with time zone — NOT NULL
  • created_at — timestamp(6) with time zone — NOT NULL

audit_events

  • id — bigint — Primary key — NOT NULL
  • entity_type — text — NOT NULL
  • entity_id — bigint — NOT NULL
  • action — text — NOT NULL
  • actor_user_id — bigint
  • actor_email — text
  • reason — text
  • metadata — jsonb
  • created_at — timestamp(6) with time zone — NOT NULL

certificates (AS보증서)

  • id — bigint — Primary key — NOT NULL
  • order_id — bigint — Foreign key → orders.id — NOT NULL
  • installation_id — bigint — Foreign key → installations.id
  • cert_no — text
  • issued_at — timestamp(6) with time zone
  • as_period_months — integer — NOT NULL
  • as_expire_at — timestamp(6) with time zone
  • memo — text
  • created_at — timestamp(6) with time zone — NOT NULL
  • public_token_hash — text
  • public_token_created_at — timestamp(6) with time zone
  • public_token_revoked_at — timestamp(6) with time zone

cs_inquiries (이용문의)

  • id — bigint — Primary key — NOT NULL
  • order_id — bigint — Foreign key → orders.id
  • franchise_id — bigint — Foreign key → franchises.id
  • customer_name — text
  • customer_phone — text
  • channel — text — NOT NULL
  • category — text
  • content — text — NOT NULL
  • status — text — NOT NULL
  • memo — text
  • source — text — NOT NULL
  • created_by — text
  • resolved_by — text
  • created_at — timestamp(6) with time zone — NOT NULL
  • updated_at — timestamp(6) with time zone — NOT NULL
  • resolved_at — timestamp(6) with time zone

customer_reservations (예약)

  • id — bigint — Primary key — NOT NULL
  • customer_name — text
  • normalized_name — text
  • normalized_phone — text
  • franchise_id — bigint — Foreign key → franchises.id
  • status — text — NOT NULL
  • happy_call_status — text — NOT NULL
  • scheduled_at — timestamp(6) with time zone
  • memo — text
  • created_at — timestamp(6) with time zone — NOT NULL
  • updated_at — timestamp(6) with time zone — NOT NULL
  • version — integer — NOT NULL
  • canceled_at — timestamp(6) with time zone
  • public_cancel_reason — text

franchises (가맹점)

  • id — bigint — Primary key — NOT NULL
  • name — text — NOT NULL
  • region — text
  • contact — text
  • status — text — NOT NULL
  • created_at — timestamp(6) with time zone — NOT NULL

installations (시공)

  • id — bigint — Primary key — NOT NULL
  • order_id — bigint — Foreign key → orders.id — NOT NULL
  • franchise_id — bigint — Foreign key → franchises.id
  • scheduled_at — timestamp(6) with time zone
  • started_at — timestamp(6) with time zone
  • completed_at — timestamp(6) with time zone
  • status — text
  • memo — text
  • created_at — timestamp(6) with time zone — NOT NULL

marker

  • created_at — timestamp with time zone — NOT NULL

notifications (카카오_알림)

  • id — bigint — Primary key — NOT NULL
  • order_id — bigint — Foreign key → orders.id
  • channel — text — NOT NULL
  • template — text
  • sent_at — timestamp(6) with time zone
  • result — text
  • created_at — timestamp(6) with time zone — NOT NULL
  • status — text — NOT NULL
  • payload — jsonb
  • recipient_phone — text
  • scheduled_for — timestamp(6) with time zone
  • attempts — integer — NOT NULL
  • last_error — text
  • provider_message_id — text
  • updated_at — timestamp(6) with time zone — NOT NULL
  • reservation_id — bigint — Foreign key → customer_reservations.id
  • reservation_version — integer
  • event_type — text
  • mode — text — NOT NULL
  • template_code — text

orders (주문)

  • id — bigint — Primary key — NOT NULL
  • naver_order_id — text — NOT NULL
  • naver_product_order_id — text — NOT NULL
  • naver_product_order_status — text
  • naver_place_order_status — text
  • last_changed_date — timestamp(6) with time zone
  • last_changed_type — text
  • ordered_at — timestamp(6) with time zone
  • paid_at — timestamp(6) with time zone
  • product_name — text
  • option_name — text
  • quantity — integer — NOT NULL
  • unit_price — integer — NOT NULL
  • customer_name — text
  • customer_phone — text
  • customer_address — text
  • customer_zipcode — text
  • recipient_name — text
  • hope_install_date — text
  • assigned_franchise_id — bigint — Foreign key → franchises.id
  • workflow_status — public.workflow_status — NOT NULL
  • naver_synced_at — timestamp(6) with time zone — NOT NULL
  • created_at — timestamp(6) with time zone — NOT NULL
  • normalized_customer_name — text
  • normalized_customer_phone — text
  • shipment_status — public.shipment_status — NOT NULL

reservation_events (예약 상태 변화)

  • id — bigint — Primary key — NOT NULL
  • reservation_id — bigint — Foreign key → customer_reservations.id — NOT NULL
  • event_type — text — NOT NULL
  • version — integer — NOT NULL
  • payload — jsonb — NOT NULL
  • occurred_at — timestamp(6) with time zone — NOT NULL

reservation_items (예약 <-> 주문)

  • id — bigint — Primary key — NOT NULL
  • reservation_id — bigint — Foreign key → customer_reservations.id — NOT NULL
  • order_id — bigint — Foreign key → orders.id — NOT NULL
  • included_at — timestamp(6) with time zone — NOT NULL
  • included_by — text

sync_cursor

  • id — bigint — Primary key — NOT NULL
  • last_changed_from — timestamp(6) with time zone
  • last_success_at — timestamp(6) with time zone
  • more_sequence — text
  • result — text