1 require 'dm-validations'
6 include DataMapper::Resource
8 property :id, Integer, :serial => true
9 property :username, String, :length => 50
10 property :email_address, String, :length => 50, :nullable => false, :index => :unique
11 property :password, String, :length => 20
12 property :created_on, DateTime
13 property :first_name, String, :length => 50, :nullable => false
14 property :last_name, String, :length => 50, :nullable => false
19 has n, :wishlist_items
20 # has n, :items, :through => :wishlist_items ## FIXME
22 validates_present :email_address
23 validates_length :email_address, :maximum => 255