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.38 app/models/comee/core/user.rb
comee_core-0.1.37 app/models/comee/core/user.rb
comee_core-0.1.36 app/models/comee/core/user.rb
comee_core-0.1.35 app/models/comee/core/user.rb
comee_core-0.1.34 app/models/comee/core/user.rb
comee_core-0.1.33 app/models/comee/core/user.rb