wordpray / pinterest

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

users

Column Type Options
name string add_index :users, :name, null: false, unique: true
email string null: false
password integer null: false
user_id integer null: false, foreign_key: true
gender enum('M','F')
age integer

Association

  • has_many : pins
  • has_many : user_boards
  • has_many : boards, through: :user_boards

boards

Column Type Options
name string add_index :boards, :name, null: false, unique: true

Association

  • has_many : pins
  • has_many : user_boards
  • has_many : users, through: :user_boards

user_boards

Column Type Options
user_id references null: false, foreign_key: true
boards_id references null: false, foreign_key: true

Association

  • belongs_to : user
  • belongs_to : board

pins

Column Type Options
title string
description
image string null: false
board_id references null: false, foreign_key: true
user_id references null: false, foreign_key: true

Association

  • has_many : board_pins
  • has_many : boards, through: :board_pins
  • belongs_to : user

board_pins

Column Type Options
pin_id references null: false, foreign_key: true
boards_id references null: false, foreign_key: true

Association

  • belongs_to : pin
  • belongs_to : board

About


Languages

Language:Ruby 65.9%Language:HTML 22.4%Language:CSS 9.8%Language:JavaScript 1.2%Language:CoffeeScript 0.7%