erd

Tables (10)

User (Untitled)

  • id (Key) — bigint — Primary key — NOT NULL
  • region_id (Key2) — bigint — Foreign key → region.id — NOT NULL
  • username (Field) — string
  • password (Field2) — string
  • email (Field3) — string
  • phone_number (Field4) — string
  • birth_date (Field6) — string
  • user_status (Field21) — Enum
  • user_role (Field5) — Enum

category (Untitled3)

  • id (Key) — bigint — Primary key — NOT NULL
  • category_name (Field) — String
  • parent_category_id (Key2) — bigint — Foreign key → category.id — NOT NULL

chatting_participant (Untitled9)

  • id (Key) — bigint — Primary key — NOT NULL
  • chattingRoom_id (Key2) — bigint — Foreign key → chatting_room.id — NOT NULL
  • user_id (Key3) — bigint — Foreign key → User.id — NOT NULL
  • unread_count (Field) — bigint
  • last_read_message_id (Field2) — bigint

chatting_room (Untitled8)

  • id (Key) — bigint — Primary key — NOT NULL
  • title (Field)
  • created_at (Field2) — DateTime

image (Untitled4)

  • id (Key) — bigint — Primary key — NOT NULL
  • post_id (Key2) — bigint — Foreign key → post.id — NOT NULL
  • image_url (Field) — String

message (Untitled10)

  • id (Key) — bigint — Primary key — NOT NULL
  • chatting_room_id (Key2) — bigint — Foreign key → chatting_room.id — NOT NULL
  • user_id (Key3) — bigint — Foreign key → User.id — NOT NULL
  • content (Field) — String
  • send_time (Field2) — DateTIme
  • Field3

post (Untitled2)

  • id (Key) — bigint — Primary key — NOT NULL
  • category_id (Key3) — bigint — Foreign key → category.id — NOT NULL
  • title (Field) — String
  • registTime (Field2) — DateTime
  • viewCount (Field3) — int
  • reviewsCount (Field9) — bigint
  • rating (Field4) — double
  • description (Field5) — String
  • price (Field6) — int
  • status (Field7) — Boolean
  • position (Field8) — Embedded
  • likeCount (Field10) — bigint

post_bookmark (Untitled5)

  • id (Key) — bigint — Primary key — NOT NULL
  • user_id (Key2) — bigint — Foreign key → User.id — NOT NULL
  • post_id (Key3) — bigint — Foreign key → post.id — NOT NULL
  • Field

region (Untitled6)

  • id (Key) — bigint — Primary key — NOT NULL
  • region_name (Field) — String
  • parent_region_id (Key2) — bigint — Foreign key → region.id — NOT NULL

review (Untitled11)

  • id (Key) — bigint — Primary key — NOT NULL
  • user_id (Key2) — bigint — Foreign key → User.id — NOT NULL
  • region_id (Key22) — bigint — Foreign key → User.region_id — NOT NULL
  • post_id (Key4) — bigint — Foreign key → post.id — NOT NULL
  • category_id (Key32) — bigint — Foreign key → post.category_id — NOT NULL
  • content (Field) — string
  • rating (Field2)
  • created_at (Field3)