Column | Type | Options |
---|---|---|
name | string | index :true, null false, unique true |
- has_many :groups, through :members
- has_many :messages
- has_many :members
Column | Type | Options |
---|---|---|
name | string | null false, unique true |
- has_many :users ,through :members
- has_many :messages
Column | Type | Options |
---|---|---|
group_id | integer | null false,foreign_key :true |
user_id | integer | null false,foreign_key :true |
- belongs_to :group
- belongs_to :user
Column | Type | Options |
---|---|---|
body | text | - |
image | string | - |
group_id | integer | null false,foreign_key :true |
user_id | integer | null false,foreign_key :true |
- belongs_to :user
- belongs_to :group