name | type |
---|---|
name | string |
string | |
password | string |
- has_many :groups through: :user_groups
- has_many :massages
#Groups
name | type |
---|---|
name | string |
- has_many :users through: :user_groups
- has_many :massages
#Massages
name | type |
---|---|
body | text |
image | string |
user_id | references |
group_id | references |
- belongs_to :user
- belongs_to :massage
#User_groups
name | type |
---|---|
user_id | reference |
group_id | reference |
- belongs_to :user
- belongs_to :group