added brands
This commit is contained in:
3
back-office/app/models/brand.rb
Normal file
3
back-office/app/models/brand.rb
Normal file
@@ -0,0 +1,3 @@
|
||||
class Brand < ActiveRecord::Base
|
||||
has_many :items
|
||||
end
|
||||
@@ -3,6 +3,7 @@ class Item < ActiveRecord::Base
|
||||
has_many :multi_media_descriptions
|
||||
belongs_to :sub_category
|
||||
belongs_to :supplier
|
||||
belongs_to :brand
|
||||
has_and_belongs_to_many :item_groups, :join_table => 'item_item_groups'
|
||||
|
||||
validates_presence_of :name, :description, :list_price, :current_input_price, :tags, :unit_id, :code, :sub_category_id, :weight, :supplier_id
|
||||
|
||||
Reference in New Issue
Block a user