Column | Type | Options |
---|---|---|
name | string | null: false, index: true |
email_address | string | null: false |
password | string | null: false |
- has_many :groups_users has_many :groups, through: :groups_users
- has_many :chats
Column | Type | Options |
---|---|---|
name | string | null: false |
- has_many :users, through: :groups_users has_many :groups_users
- has_many :chats
Column | Type | Options |
---|---|---|
user | references | null: false, foreign_key: true |
group | references | null: false, foreign_key: true |
- belongs_to :group
- belongs_to :user
Column | Type | Options |
---|---|---|
text | string | |
image | string | |
user | references | null: false, foreign_key: true |
group | references | null: false, foreign_key: true |
- belongs_to :group
- belongs_to :user