* Removed lines of Artistic License 1.0 encumbered,
[merb_mart.git] / app / models / account.rb
blob2e95596ca3e658465bf03bf0f0892d9b7b8adf92
1 require 'validate'
3 class Account
4   
5   include DataMapper::Resource
6   include DataMapper::Validate
7   require 'ezcrypto'
8   
9   one_to_one :order_account_type
10   one_to_one :order
11   many_to_one :order_user, :accessor => :protected
12   
13   property :cc_number,        String
14   property :account_number,   String
15   property :expiration_month, Fixnum, :length => 2
16   property :expiration_year,  Fixnum, :length => 4
17   property :credit_ccv,       Fixnum, :length => 5
18   property :routing_number,   String, :length => 20
19   property :bank_name,        String, :length => 50
21 end