Sha256: 4d57a72bd1d1064581e518b714b1e55aac15d607ed357b56665fb8925c44a536

Contents?: true

Size: 343 Bytes

Versions: 86

Compression:

Stored size: 343 Bytes

Contents

module Comee
  module Core
    class User < ApplicationRecord
      enum :user_type, {supplier: 0, admin: 1, client: 2, worker: 3}

      has_secure_password
      has_many :notifications, as: :recipient, dependent: :destroy

      validates :name, :email, :user_type, presence: true
      validates :email, uniqueness: true
    end
  end
end

Version data entries

86 entries across 86 versions & 1 rubygems

Version Path
comee_core-0.1.95 app/models/comee/core/user.rb
comee_core-0.1.94 app/models/comee/core/user.rb
comee_core-0.1.93 app/models/comee/core/user.rb
comee_core-0.1.92 app/models/comee/core/user.rb
comee_core-0.1.91 app/models/comee/core/user.rb
comee_core-0.1.90 app/models/comee/core/user.rb
comee_core-0.1.89 app/models/comee/core/user.rb
comee_core-0.1.88 app/models/comee/core/user.rb
comee_core-0.1.87 app/models/comee/core/user.rb
comee_core-0.1.86 app/models/comee/core/user.rb
comee_core-0.1.85 app/models/comee/core/user.rb
comee_core-0.1.84 app/models/comee/core/user.rb
comee_core-0.1.83 app/models/comee/core/user.rb
comee_core-0.1.82 app/models/comee/core/user.rb
comee_core-0.1.81 app/models/comee/core/user.rb
comee_core-0.1.80 app/models/comee/core/user.rb
comee_core-0.1.79 app/models/comee/core/user.rb
comee_core-0.1.78 app/models/comee/core/user.rb
comee_core-0.1.77 app/models/comee/core/user.rb
comee_core-0.1.76 app/models/comee/core/user.rb