one git repo to rule them all\!

This commit is contained in:
Senad Uka
2015-01-22 06:38:48 +01:00
parent c003584f7e
commit 23a6fda854
149 changed files with 967 additions and 4 deletions

View File

View File

@@ -0,0 +1,4 @@
class Category < ActiveRecord::Base
has_many :sub_categories
belongs_to :section
end

View File

@@ -0,0 +1,7 @@
class Item < ActiveRecord::Base
belongs_to :unit
has_many :multi_media_descriptions
belongs_to :sub_category
validates_presence_of :name, :description, :list_price, :current_input_price, :tags, :unit_id, :code, :sub_category_id
end

View File

@@ -0,0 +1,3 @@
class MediaType < ActiveRecord::Base
has_many :multi_media_descriptions
end

View File

@@ -0,0 +1,4 @@
class MultiMediaDescription < ActiveRecord::Base
belongs_to :item
belongs_to :media_type
end

View File

@@ -0,0 +1,3 @@
class Section < ActiveRecord::Base
has_many :categories
end

View File

@@ -0,0 +1,5 @@
class SubCategory < ActiveRecord::Base
belongs_to :category
has_many :items
end

View File

@@ -0,0 +1,2 @@
class Unit < ActiveRecord::Base
end