Skip to content

Latest commit

 

History

History
97 lines (74 loc) · 3.64 KB

README.md

File metadata and controls

97 lines (74 loc) · 3.64 KB

chat-space

     
   

🌐 URL


📝 このアプリについて

チャットアプリケーションです グループに登録されたユーザー同士でコメントと画像を投稿する事ができます

  • 非同期通信でリアルタイムにコメントが表示されます
  • インクリメンタルサーチによりグループにユーザーを追加する際、候補が表示されます
  • 自動更新に対応しているので他の人のコメントが自動で反映されます

📕 機能紹介

・非同期通信


・インクリメンタルサーチ


・自動更新


📊 chat-spaceデータベース設計

usersテーブル

Column Type Options
id integer null: false, unique: true
name string
email string null: false, unique: true
password string null: false

Association

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

groupsテーブル

Column Type Options
id integer null: false, unique: true
name string null: false

Association

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

groups_usersテーブル(中間テーブル)

Column Type Options
id integer null: false, unique: true
user_id integer null: false, foreign_key: true
group_id integer null: false, foreign_key: true

Association

  • belongs_to :group
  • belongs_to :user

messagesテーブル

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

Association

  • belongs_to :group
  • belongs_to :user