class User < ApplicationRecord
  # Include default devise modules. Others available are:
  # :confirmable, :lockable, :timeoutable and :omniauthable
  devise :database_authenticatable, :registerable,
         :recoverable, :rememberable, :trackable, :validatable
  has_many :members
  has_many :groups, through: :members
  has_many :messages

  # validates :nickname, presence: true, length: { maximum: 6 }
end
