initial commit
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
class Product
|
||||
include SimplyStored::Couch
|
||||
|
||||
property :name
|
||||
property :code
|
||||
property :price
|
||||
|
||||
belongs_to :product_category
|
||||
belongs_to :supplier # direct! category is an aid
|
||||
has_many :product_orders
|
||||
|
||||
validates :supplier_id, presence: true
|
||||
|
||||
end
|
||||
Reference in New Issue
Block a user