YSKh616 / chat-space

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

DB設計

users table

Column Type Options
name string index: true, null: false, unique: true
mail string null:false

Association

  • has_many: groups, through: groups_users
  • has_many: messages
  • has_many: groups_users

groups table

Column Type Options
name string index: true, null: false, unique: true

Association

  • has_many: users, through: groups_users
  • has_many: messages
  • has_many: groups_users

groups_users table

Column Type Options
user_id integer foreign_key: true
group_id integer foreign_key: true

Association

  • belongs_to: user
  • belongs_to: group

messages table

Column Type Options
body text null: false
image string null: false
user_id integer null: false, foreign_key: true
group_id integer null: false, foreign_key: true

Association

  • belongs_to: user
  • belongs_to: group

About


Languages

Language:Ruby 66.7%Language:HTML 17.0%Language:CSS 10.6%Language:JavaScript 5.7%