maketing

Tables (21)

account_weekly_metrics

  • id — UUID — Primary key — NOT NULL
  • store_id — UUID — Foreign key → stores.id — NOT NULL
  • total_reach — INTEGER
  • target_post_count — INTEGER
  • actual_post_count — INTEGER
  • achievement_rate — DECIMAL(5, 2)
  • visit_intent_score — INTEGER
  • created_at — TIMESTAMPTZ
  • is_deleted — BOOLEAN

api_token_logs

  • id — UUID — Primary key — NOT NULL
  • user_id — UUID — Foreign key → users.id — NOT NULL
  • old_expires_at — TIMESTAMPTZ
  • new_expires_at — TIMESTAMPTZ
  • created_at — TIMESTAMPTZ

canonical_keywords

  • id — BIGINT — Primary key — NOT NULL
  • code — VARCHAR(100)
  • display_name — VARCHAR(200) — NOT NULL — 사용자/운영자가
  • embedding — VECTOR(1536) — NOT NULL — 표준
  • created_at — TIMESTAMPTZ — NOT NULL

contents

  • id — BIGINT — Primary key — NOT NULL
  • store_id — UUID — Foreign key → stores.id — NOT NULL
  • session_id — UUID
  • caption — TEXT
  • instagram_media_id — VARCHAR(100)
  • instagram_permalink — TEXT
  • published_at — TIMESTAMPTZ
  • is_deleted — BOOLEAN
  • deleted_at — TIMESTAMPTZ
  • created_at — TIMESTAMPTZ

contents_images

  • id — UUID — Primary key — NOT NULL
  • contents_id — BIGINT — Foreign key → contents.id — NOT NULL
  • s3_key — VARCHAR(200) — NOT NULL

device_tokens

  • id — UUID — Primary key — NOT NULL
  • user_id — UUID — Foreign key → users.id — NOT NULL
  • token — TEXT
  • platform — VARCHAR
  • is_active — BOOLEAN
  • created_at — TIMESTAMPTZ
  • updated_at — TIMESTAMPTZ

holidays

  • id — UUID — Primary key — NOT NULL
  • holiday_date — DATE — NOT NULL
  • name — VARCHAR(200) — NOT NULL
  • created_at — TIMESTAMPTZ

instagram_metrics

  • id — UUID — Primary key — NOT NULL
  • contents_id — BIGINT — Foreign key → contents.id
  • store_id — UUID — Foreign key → stores.id — NOT NULL
  • instagram_media_id — VARCHAR(100) — NOT NULL
  • reaches — INTEGER
  • saves — INTEGER
  • shares — INTEGER
  • likes — INTEGER
  • created_at — TIMESTAMPTZ

menus

  • id — UUID — Primary key — NOT NULL
  • store_id — UUID — Foreign key → stores.id — NOT NULL
  • name — VARCHAR(200) — NOT NULL
  • price — INTEGER
  • description — TEXT
  • weather_tags — JSONB
  • holiday_tags — JSONB
  • created_at — TIMESTAMPTZ
  • updated_at — TIMESTAMPTZ
  • embedding — VECTOR(1536)

notifications

  • id — UUID — Primary key — NOT NULL
  • store_id — UUID — Foreign key → stores.id — NOT NULL
  • notification — TEXT
  • scheduled_at — TIMESTAMPTZ
  • created_at — TIMESTAMPTZ
  • type — SMALLINT
  • status — SMALLINT
  • sent_at — TIMESTAMPTZ
  • updated_at — TIMESTAMPTZ
  • retry_count — INTEGER
  • failure_reason — TEXT
  • web_url — TEXT
  • reference_id — UUID

reference

  • id — BIGINT — Primary key — NOT NULL
  • caption_id — BIGINT — Foreign key → reference_captions.id — NOT NULL
  • image_id — BIGINT — Foreign key → reference_images.id — NOT NULL
  • owner_persona — maketing.owner_persona_type
  • store_name — VARCHAR(200)
  • created_at — DATE
  • instagram_id — VARCHAR(200)

reference_caption_keywords

  • reference_caption_id — BIGINT — Foreign key → reference_captions.id — NOT NULL
  • canonical_keyword_id — BIGINT — Foreign key → canonical_keywords.id — NOT NULL

reference_captions

  • id — BIGINT — Primary key — NOT NULL
  • caption_content — TEXT — NOT NULL
  • embedding — VECTOR(1536) — NOT NULL

reference_image_keywords

  • reference_image_id — BIGINT — Foreign key → reference_images.id — NOT NULL
  • canonical_keyword_id — BIGINT — Foreign key → canonical_keywords.id — NOT NULL

reference_images

  • id — BIGINT — Primary key — NOT NULL
  • sort_order — SMALLINT
  • s3_key — VARCHAR(200) — NOT NULL
  • focus_subject — VARCHAR(100)
  • focus_subject_embedding — VECTOR(1536)
  • shot_type — VARCHAR(20) — 원본
  • shot_type_code — VARCHAR(50)
  • shot_type_embedding — VECTOR(1536)
  • camera_angle — VARCHAR(20) — 원본
  • camera_angle_code — VARCHAR(50)
  • camera_angle_embedding — VECTOR(1536)
  • style_filter — VARCHAR(100) — 예:
  • lighting_params — JSONB — 표준

store_hours

  • store_id — UUID — Foreign key → stores.id — NOT NULL
  • monday_open — TIME
  • tuesday_open — TIME
  • wednesday_open — TIME
  • thursday_open — TIME
  • friday_open — TIME
  • saturday_open — TIME
  • sunday_open — TIME
  • monday_close — TIME
  • tuesday_close — TIME
  • wednesday_close — TIME
  • thursday_close — TIME
  • friday_close — TIME
  • saturday_close — TIME
  • sunday_close — TIME

stores

  • id — UUID — Primary key — NOT NULL
  • user_id — UUID — Foreign key → users.id — NOT NULL
  • merchant_id — VARCHAR(20)
  • store_name — VARCHAR(200) — NOT NULL
  • category — maketing.category_type
  • owner_persona — maketing.owner_persona_type
  • address — TEXT
  • latitude — DECIMAL(10, 7)
  • longitude — DECIMAL(10, 7)
  • operating_hours — JSONB — 영업시간
  • created_at — TIMESTAMPTZ
  • updated_at — TIMESTAMPTZ

upload_history

  • id — UUID — Primary key — NOT NULL
  • store_id — UUID — Foreign key → stores.id — NOT NULL
  • uploaded_at — TIMESTAMPTZ — NOT NULL
  • uploaded_date — DATE
  • day_of_week — SMALLINT — NOT NULL
  • created_at — TIMESTAMPTZ

upload_patterns

  • id — UUID — Primary key — NOT NULL
  • store_id — UUID — Foreign key → stores.id — NOT NULL
  • day_of_week — SMALLINT — NOT NULL
  • predicted_time — TIME
  • sample_count — INTEGER
  • last_updated — TIMESTAMPTZ

users

  • id — UUID — Primary key — NOT NULL
  • instagram_user_id — VARCHAR(100) — NOT NULL
  • instagram_username — VARCHAR(100)
  • access_token — TEXT
  • token_expires_at — TIMESTAMPTZ
  • camera_mic_granted — BOOLEAN
  • created_at — TIMESTAMPTZ
  • updated_at — TIMESTAMPTZ

video_recordings

  • id — UUID — Primary key — NOT NULL
  • contents_id — BIGINT — Foreign key → contents.id — NOT NULL
  • s3_key — VARCHAR(200) — NOT NULL