Sha256: 3994efce8905c08d4614dead78bdb44ae17db1e751783f43e33874a8677bcef5

Contents?: true

Size: 704 Bytes

Versions: 16

Compression:

Stored size: 704 Bytes

Contents

class User
  include Dynamoid::Document
  
  field :name
  field :email
  field :password
  field :last_logged_in_at, :datetime
  
  index :name
  index :email
  index [:name, :email]
  index :name, :range_key => :created_at
  index :name, :range_key => :last_logged_in_at
  index :created_at, :range => true
  
  has_and_belongs_to_many :subscriptions

  has_many :books, :class_name => 'Magazine', :inverse_of => :owner
  has_one :monthly, :class_name => 'Subscription', :inverse_of => :customer

  has_and_belongs_to_many :followers, :class_name => 'User', :inverse_of => :following
  has_and_belongs_to_many :following, :class_name => 'User', :inverse_of => :followers

  belongs_to :camel_case

end

Version data entries

16 entries across 16 versions & 3 rubygems

Version Path
dynamoid-moda-0.7.2 spec/app/models/user.rb
dynamoid-moda-0.7.1 spec/app/models/user.rb
dynamoid-0.7.1 spec/app/models/user.rb
dynamoid-0.7.0 spec/app/models/user.rb
dynamoid-0.6.1 spec/app/models/user.rb
dynamoid-0.6.0 spec/app/models/user.rb
adept_dynamoid-0.6.0 spec/app/models/user.rb
adept_dynamoid-0.5.0.8 spec/app/models/user.rb
adept_dynamoid-0.5.0.7 spec/app/models/user.rb
adept_dynamoid-0.5.0.6 spec/app/models/user.rb
dynamoid-0.5.0 spec/app/models/user.rb
dynamoid-0.4.1 spec/app/models/user.rb
dynamoid-0.4.0 spec/app/models/user.rb
dynamoid-0.3.2 spec/app/models/user.rb
dynamoid-0.3.1 spec/app/models/user.rb
dynamoid-0.3.0 spec/app/models/user.rb