반려동물AI

테이블 (4)

chat (채팅기록)

  • chat_id (Key) — 기본 키 — NOT NULL
  • user_id (UID) — 외래 키 → user.user_id — NOT NULL
  • pet_id (Key2) — 외래 키 → pet.pet_id — NOT NULL
  • user_message (사용자의 질문)
  • ai_response (ai 답변)
  • created_at (대화 일시)

pet (반려동물)

  • pet_id (Key) — 기본 키 — NOT NULL
  • user_id (UID) — 외래 키 → user.user_id — NOT NULL
  • name (이름)
  • species (동물 종류)
  • age (나이)
  • relation (나와의 관계 (가족, 친구))
  • profile_image_url (이미지 경로)
  • personailty (성격 (선택사항))
  • created_at (등록일)
  • deleted_yn (제거여부)
  • Field (제거일)

subscription_history (구독 내역)

  • subscription_history_id (Key) — 기본 키 — NOT NULL
  • user_id (UID) — 외래 키 → user.user_id — NOT NULL
  • start_date (구독 시작일)
  • end_date (구독 종료일)
  • is_active (현재 구독 상태)
  • platform (Android,IOS)
  • purchase_token (결제 토큰)

user (회원)

  • user_id (UID) — 기본 키 — NOT NULL
  • email (이메일)
  • nickname (닉네임)
  • created_at (가입 일시)
  • is_subscription (구독 여부) — boolean
  • remaining (남은질문 수)
  • deleted_yn (탈퇴여부)
  • deleted_at (털퇴일)