progress and end of day commit
This commit is contained in:
@@ -3,7 +3,7 @@ class Product
|
||||
|
||||
property :name
|
||||
property :code
|
||||
property :price
|
||||
property :price, type: Float
|
||||
|
||||
belongs_to :product_category
|
||||
belongs_to :supplier # direct! category is an aid
|
||||
|
||||
@@ -2,6 +2,11 @@ class ProductCategory
|
||||
include SimplyStored::Couch
|
||||
|
||||
property :name
|
||||
property :position, type: Fixnum, default: 0
|
||||
|
||||
belongs_to :supplier
|
||||
has_many :products
|
||||
|
||||
validates :position, numericality: true
|
||||
validates :supplier_id, presence: true
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user