column | type | constraint | index |
---|---|---|---|
name | string | null&false, unique: true | ◯ |
column | type | constraint | index |
---|---|---|---|
name | string | null&false | - |
column | type | constraint | index |
---|---|---|---|
user_id | reference | foreign_key: true | ◯ |
chat_group_id | reference | foreign_key: true | ◯ |
column | type | constraint | index |
---|---|---|---|
body | text | - | - |
image | string | - | - |
user_id | reference | foreign_key: true | ◯ |
chat_group_id | reference | foreign_key: true | ◯ |
- has_many :chat_group_users
- has_many :messages
- has_many :chat_groups, through :chat_group_user
- has_many :chat_group_users
- has_many :messages
- has_many :users, through :chat_group_user
- belongs_to :user
- belongs_to :chat_group
- belongs_to :user
- belongs_to :user