- has_many :messages
- has_many :groups, :through: :members
- t.string :name, null: false
- has_many :messages
- has_many :users, :through: :members
- t.string :name, null: false
- belongs_to :user
- belongs_to :group
- t.text :body, null: false
- t.string :image,
- references :user, foreign_key: true
- references :group, foreign_key: true
- belongs_to :user
- belongs_to :group
- references :user, foreign_key: true
- references :group, foreign_key: true