practice

Tables (7)

book (Untitled2)

  • id — bigint — Primary key — NOT NULL
  • id (Key) — bigint — Foreign key → category.id — NOT NULL
  • name (Field) — varchar(40)
  • description (Field2) — text
  • created_at (Field3) — datatime(6)
  • updated_at (Field4) — datatime(6)

book_hash_tag (Untitled4)

  • id (Key) — bigint — Primary key — NOT NULL
  • hash_tag_id (Key3) — bigint — Foreign key → hash_tag.id — NOT NULL
  • book_id (id) — bigint — Foreign key → book.id — NOT NULL
  • id (Key2) — bigint — Foreign key → book.id — NOT NULL

book_likes (Untitled7)

  • Key — Primary key — NOT NULL
  • user_id (Key2) — bigint — Foreign key → user.id — NOT NULL
  • book_id (id) — bigint — Foreign key → book.id — NOT NULL
  • id (Key3) — bigint — Foreign key → book.id — NOT NULL
  • created_at (Field) — datetime(6)
  • updated_at (Field2) — datetime(6)

category (Untitled3)

  • id (Key) — bigint — Primary key — NOT NULL
  • name (Field) — varchar(20)
  • created_at (Field2) — datetime(6)
  • updated_at (Field3) — datetime(6)

hash_tag (Untitled5)

  • id (Key) — bigint — Primary key — NOT NULL
  • name (Field) — varchar(20)
  • created_at (Field2) — datetime(6)
  • updated_at (Field3) — datetime(6)

rent (Untitled6)

  • id (Key) — bigint — Primary key — NOT NULL
  • user_id (Key2) — bigint — Foreign key → user.id — NOT NULL
  • book_id (id) — bigint — Foreign key → book.id — NOT NULL
  • id (Key3) — bigint — Foreign key → book.id — NOT NULL
  • created_at (Field) — datetime(6)
  • updated_at (Field2) — datetime(6)

user (Untitled)

  • id (Key) — bigint — Primary key — NOT NULL
  • phone-num (Field) — varchar(15)
  • name (Field2) — varchar(10)
  • nickname (Field3) — varchar(20)
  • gender (Field4) — varchar(10)
  • created_at (Field5) — datatime(6)
  • updated_at (Field6) — datatime(6)
  • status (Field7) — varchat(15)
  • inactive_date (Field8) — datetime