banzzokee

Tables (12)

adoption (입양글)

  • id (입양글 아이디) — bigint — Primary key — NOT NULL
  • title (제목) — varchar(255) — NOT NULL
  • content (내용) — varvhar(255) — NOT NULL
  • status (상태) — enum() — NOT NULL
  • breed (견종) — enum() — NOT NULL
  • size (크기) — enum() — NOT NULL
  • neutering (중성화) — bit(1) — NOT NULL
  • gender (성별) — enum — NOT NULL
  • age (추정 나이) — int — NOT NULL
  • health_checked (건강검진) — bit(1) — NOT NULL
  • registered_dt (보호소 등록일) — date — NOT NULL
  • images (사진) — json — NOT NULL
  • adopted_at (입양일시) — date
  • user_id (분양자) — bigint — Foreign key → user.id — NOT NULL
  • assigned_user_id (입양자) — bigint — Foreign key → user.id
  • review_id (입양후기 아이디) — bigint — Foreign key → review.id
  • created_at (생성일시) — datetime(6) — NOT NULL
  • updated_at (수정일시) — datetime(6)
  • deleted_at (삭제일시) — datetime(6)

bookmark (북마크)

  • id (북마크 아이디) — bigint — Primary key — NOT NULL
  • user_id (사용자 PK) — bigint — Foreign key → user.id — NOT NULL — unique
  • adoption_id (입양글 아이디) — bigint — Foreign key → adoption.id — NOT NULL — unique
  • created_at (생성일시) — datetime(6) — NOT NULL

chat_message (채팅 기록)

  • id (메시지 아이디) — bigint — Primary key — NOT NULL
  • room_id (룸 아이디) — bigint — Foreign key → chat_room.id — NOT NULL
  • user_id (사용자 PK) — bigint — Foreign key → user.id — NOT NULL
  • message (채팅 내용) — varchar(255) — NOT NULL
  • message_type (메시지 타입) — enum
  • created_at (생성일시) — datetime(6) — NOT NULL

chat_room (채팅방)

  • id (룸 아이디) — bigint — Primary key — NOT NULL
  • adoption_id (입양글 아이디) — bigint — Foreign key → adoption.id — NOT NULL
  • user_id (사용자 PK) — bigint — Foreign key → user.id — NOT NULL
  • shelter_id (보호소 아이디) — bigint — Foreign key → shelter.id
  • created_at (생성일시) — datetime(6) — NOT NULL
  • deleted_at (삭제일시) — datetime(6)
  • last_message (마지막 메시지) — varchar(255)
  • last_message_type (마지막 메시지 타입) — enum
  • last_message_created_at (마지막 메시지 생성일시) — datetime(6)

fcm_subscription (FCM 구독)

  • id (구독 아이디) — bigint — Primary key — NOT NULL
  • token_id (토큰 아이디) — bigint — Foreign key → fcm_token.id — NOT NULL
  • topic (토픽) — varchar(255) — NOT NULL
  • created_at (생성일시) — datetime(6) — NOT NULL
  • updated_at (수정일시) — datetime(6)

fcm_token (FCM 토큰)

  • id (토큰 아이디) — bigint — Primary key — NOT NULL
  • user_id (사용자 PK) — bigint — Foreign key → user.id — NOT NULL
  • token (fcm 토큰) — varchar(255) — NOT NULL
  • last_used_at (마지막사용일시) — datetime(6) — NOT NULL
  • created_at (생성일시) — datetime(6) — NOT NULL
  • updated_at (수정일시) — datetime(6)

follow (팔로우)

  • id (팔로우 아이디) — bigint — Primary key — NOT NULL
  • follower (팔로우 하는 유저) — bigint — Foreign key → user.id — NOT NULL — unique
  • followee (팔로우 받는 유저) — bigint — Foreign key → user.id — NOT NULL — unique
  • created_at (생성일시) — datetime(6) — NOT NULL

notification (알림)

  • id (알림 아이디) — varchar — Primary key — NOT NULL
  • message (메시지) — NOT NULL
  • created_at (생성일시) — datetime(6) — NOT NULL

notification_receiver (알림 수신자)

  • id (Key) — bigint — Primary key — NOT NULL
  • notification_id (알림 아이디) — varchar — Foreign key → notification.id — NOT NULL — unique
  • user_id (사용자 PK) — bigint — Foreign key → user.id — NOT NULL — unique
  • checked (읽음 여부) — bit — NOT NULL
  • created_at (생성 일시) — datetime(6) — NOT NULL
  • updated_at (수정 일시) — datetime(6)

review (입양후기)

  • id (입양후기 아이디) — bigint — Primary key — NOT NULL
  • adoption_id (입양글 아이디) — bigint — Foreign key → adoption.id — NOT NULL
  • user_id (작성자 아이디) — bigint — Foreign key → user.id — NOT NULL
  • content (내용) — varchar(255) — NOT NULL
  • images (사진) — json — NOT NULL
  • created_at (생성일시) — datetime(6) — NOT NULL
  • updated_at (수정일시) — datetime(6)
  • deleted_at (삭제일시) — datetime(6)

shelter (보호소)

  • id (보호소 아이디) — bigint — Primary key — NOT NULL
  • name (이름) — varchar(255) — NOT NULL
  • description (설명) — varchar(255) — NOT NULL
  • shelter_img_url (이미지 경로) — varchar(255) — NOT NULL
  • tel (연락처) — varchar(24) — NOT NULL
  • address (주소) — varchar(255) — NOT NULL
  • latitude (위도) — Double — NOT NULL
  • longtitude (경도) — Double — NOT NULL
  • verified (보호소 승인 여부) — bit — NOT NULL
  • user_id (사용자 PK) — bigint — Foreign key → user.id — NOT NULL
  • created_at (생성일시) — datetime(6) — NOT NULL
  • updated_at (수정일시) — datetime(6)

user (사용자)

  • id (사용자 PK) — bigint — Primary key — NOT NULL
  • email (사용자 아이디) — varchar(480) — NOT NULL
  • password (비밀번호) — varchar(60)
  • nickname (닉네임) — varchar(255) — NOT NULL
  • profile_img_url (프로필 이미지 경로) — varchar(255)
  • introduce (자기소개) — varchar(255)
  • role (권한) — json — NOT NULL
  • login_type (로그인 유형) — enum('EMAIL', 'GOOGLE')
  • shelter_id (보호소 아이디) — bigint — Foreign key → shelter.id — NOT NULL
  • created_at (생성일시) — datetime(6) — NOT NULL
  • updated_at (수정일시) — datetime(6)
  • deleted_at (삭제일시) — datetime(6)