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.75 app/models/comee/core/user.rb
comee_core-0.1.74 app/models/comee/core/user.rb
comee_core-0.1.73 app/models/comee/core/user.rb
comee_core-0.1.72 app/models/comee/core/user.rb
comee_core-0.1.71 app/models/comee/core/user.rb
comee_core-0.1.70 app/models/comee/core/user.rb
comee_core-0.1.69 app/models/comee/core/user.rb
comee_core-0.1.68 app/models/comee/core/user.rb
comee_core-0.1.67 app/models/comee/core/user.rb
comee_core-0.1.66 app/models/comee/core/user.rb
comee_core-0.1.65 app/models/comee/core/user.rb
comee_core-0.1.64 app/models/comee/core/user.rb
comee_core-0.1.63 app/models/comee/core/user.rb
comee_core-0.1.62 app/models/comee/core/user.rb
comee_core-0.1.61 app/models/comee/core/user.rb
comee_core-0.1.60 app/models/comee/core/user.rb
comee_core-0.1.59 app/models/comee/core/user.rb
comee_core-0.1.58 app/models/comee/core/user.rb
comee_core-0.1.57 app/models/comee/core/user.rb
comee_core-0.1.56 app/models/comee/core/user.rb