Class: Provider

Inherits:
User
  • Object
show all
Defined in:
app/models/provider.rb

Overview

A User service Provider that creates Slots which the Customers can book.

Schema Information

Table name: users

id                                :integer          not null, primary key
email                             :string           default(""), not null
encrypted_password                :string           default(""), not null
reset_password_token              :string
reset_password_sent_at            :datetime
remember_created_at               :datetime
sign_in_count                     :integer          default("0"), not null
current_sign_in_at                :datetime
last_sign_in_at                   :datetime
current_sign_in_ip                :inet
last_sign_in_ip                   :inet
created_at                        :datetime
updated_at                        :datetime
name                              :string           not null
type                              :string           default("Provider"), not null
business_id                       :integer
provider_privacy_configuration_id :integer
confirmation_token                :string
confirmed_at                      :datetime
confirmation_sent_at              :datetime
unconfirmed_email                 :string

Indexes

index_users_on_business_id                        (business_id) UNIQUE
index_users_on_email                              (email) UNIQUE
index_users_on_provider_privacy_configuration_id  (provider_privacy_configuration_id) UNIQUE
index_users_on_reset_password_token               (reset_password_token) UNIQUE

Instance Method Summary (collapse)

Constructor Details

- (Provider) initialize

Returns a new instance of Provider



49
50
51
52
53
# File 'app/models/provider.rb', line 49

def initialize(*)
  super
  self.business ||= build_business
  self.provider_privacy_configuration ||= build_provider_privacy_configuration
end