https://github.com/takapi327/chat-space
https://github.com/takapi327/chat-space
Last synced: 9 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/takapi327/chat-space
- Owner: takapi327
- Created: 2019-11-06T08:20:07.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2023-01-19T15:43:12.000Z (over 3 years ago)
- Last Synced: 2025-02-07T08:29:50.283Z (over 1 year ago)
- Language: Ruby
- Size: 161 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 11
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# README
## how to use GitHub Desktop
This README would normally document whatever steps are necessary to get the
application up and running.
Things you may want to cover:
* Ruby version
* System dependencies
* Configuration
* Database creation
* Database initialization
* How to run the test suite
* Services (job queues, cache servers, search engines, etc.)
* Deployment instructions
* ...
## usersテーブル
|Column|Type|Options|
|------|----|-------|
|name|string|null: false|
|E-mail|string|null: false, unique: true|
|password|string|null: false|
### Association
- has_many :groups, through: :users_groups
- has_many :users_groups
- has_many :messages
## messagesテーブル
|Column|Type|Options|
|------|----|-------|
|text|text||
|image|string||
|user_id|references |null: false, foreign_key: true|
|group_id|references |null: false, foreign_key: true|
### Association
- belongs_to :user
- belongs_to :group
## groupsテーブル
|Column|Type|Options|
|------|----|-------|
|name|string|null: false|
### Association
- has_many :users, through: :users_groups
- has_many :users_groups
- has_many :messages
## users_groupsテーブル
|Column|Type|Options|
|------|----|-------|
|user_id|references |null: false, foreign_key: true|
|group_id|references |null: false, foreign_key: true|
### Association
- belongs_to :user
- belongs_to :group