7 include DataMapper::Resource
9 attr_accessor :calculated_price
11 property :id, Integer, :serial => true
12 property :name, String, :length => 100, :nullable => false
13 property :code, String, :length => 50
14 property :is_domestic, TrueClass, :default => true, :nullable => false
15 property :price, BigDecimal,:default => 0.0, :nullable => false
18 has n, :weights, :class_name => 'OrderShippingWeight' #, :dependent => :destroy
21 all(:is_domestic => true, :order => "price ASC")
25 all(:is_domestic => false, :order => "price ASC")