testanimal

Tables (10)

lost_animal_images

  • post_id (post_id2) — BIGINT — Foreign key → lost_animals.post_id
  • image_id — BIGINT
  • image_url — VARCHAR(255) — NOT NULL
  • ordering — INT

lost_animal_videos

  • post_id (post_id2) — BIGINT — Foreign key → lost_animals.post_id
  • video_id — BIGINT
  • video_url — VARCHAR(255) — NOT NULL

lost_animals

  • post_id — BIGINT — Primary key
  • user_id (user_id2) — BIGINT — Foreign key → users.user_id
  • title — VARCHAR(200) — NOT NULL
  • description — TEXT
  • lost_location — VARCHAR(255)
  • lost_time — DATETIME
  • contact_phone — VARCHAR(30)
  • view_count — INT
  • like_count — INT
  • comment_count — INT
  • created_at — DATETIME
  • updated_at — DATETIME
  • is_deleted — BOOLEAN

post_comments

  • user_id (user_id2) — BIGINT — Foreign key → users.user_id
  • post_id (post_id2) — BIGINT — Foreign key → posts.post_id
  • comment_id — BIGINT
  • content — TEXT — NOT NULL
  • created_at — DATETIME
  • updated_at — DATETIME
  • is_deleted — BOOLEAN

post_images

  • post_id (post_id2) — BIGINT — Foreign key → posts.post_id
  • image_id — BIGINT
  • image_url — VARCHAR(255) — NOT NULL
  • ordering — INT

post_likes

  • user_id (user_id2) — BIGINT — Foreign key → users.user_id
  • post_id (post_id2) — BIGINT — Foreign key → posts.post_id
  • like_id — BIGINT
  • created_at — DATETIME
  • UNIQUE(post_id, — user_id)

post_videos

  • post_id (post_id2) — BIGINT — Foreign key → posts.post_id
  • video_id — BIGINT
  • video_url — VARCHAR(255) — NOT NULL

posts

  • post_id — BIGINT — Primary key
  • user_id (user_id2) — BIGINT — Foreign key → users.user_id
  • category — ENUM('자유글', '질문글', '자랑글')
  • title — VARCHAR(200) — NOT NULL
  • content — TEXT — NOT NULL
  • view_count — INT
  • like_count — INT
  • comment_count — INT
  • is_deleted — BOOLEAN
  • created_at — DATETIME
  • updated_at — DATETIME

user_pets

  • user_id (user_id2) — BIGINT — Foreign key → users.user_id
  • pet_id — BIGINT
  • name — VARCHAR(50) — NOT NULL
  • species — ENUM('강아지', '고양이', '토끼', '기타') — NOT NULL
  • breed — VARCHAR(100)
  • birth_date — DATE
  • created_at — DATETIME

users

  • user_id — BIGINT — Primary key
  • email — VARCHAR(100) — NOT NULL
  • password — VARCHAR(255) — NOT NULL
  • nickname — VARCHAR(50) — NOT NULL
  • intro — VARCHAR(255)
  • phone — VARCHAR(20)
  • profile_img — VARCHAR(255)
  • created_at — DATETIME