serializer stuff
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
class Suppliers::EmployeeShiftSerializer
|
||||
include Qwaiter::SupplierBaseSerializer
|
||||
attributes :start_from, :end_on, :employee_id, :supplier_id
|
||||
attributes :start_from, :end_on
|
||||
has_one :supplier, serializer: Suppliers::SupplierSerializer
|
||||
has_one :employee, serializer: Suppliers::EmployeeSerializer
|
||||
end
|
||||
|
||||
@@ -4,4 +4,5 @@ class Suppliers::ProductCategorySerializer
|
||||
:active_on_thursday, :active_on_friday, :active_on_saturday, :full_day, :start_from, :end_on,
|
||||
:position
|
||||
has_many :products, serializer: Suppliers::ProductSerializer
|
||||
has_one :supplier, serializer: Suppliers::SupplierSerializer
|
||||
end
|
||||
|
||||
@@ -10,5 +10,5 @@ class Suppliers::ProductSerializer
|
||||
end
|
||||
|
||||
has_many :product_variants, serializer: Suppliers::ProductVariantSerializer
|
||||
has_one :product_category, serializer: Suppliers::ProductSerializer
|
||||
has_one :product_category, serializer: Suppliers::ProductCategorySerializer
|
||||
end
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
class Suppliers::ProductVariantSerializer
|
||||
include Qwaiter::SupplierBaseSerializer
|
||||
attributes :name
|
||||
has_one :product, serializer: Suppliers::ProductSerializer
|
||||
end
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
class Suppliers::SectionSerializer
|
||||
include Qwaiter::SupplierBaseSerializer
|
||||
attributes :title, :path, :width, :height
|
||||
attributes :title, :width, :height #, :path
|
||||
has_many :tables, serializer: Suppliers::TableSerializer
|
||||
has_many :section_areas, serializer: Suppliers::SectionAreaSerializer
|
||||
has_many :section_elements, serializer: Suppliers::SectionElementSerializer
|
||||
has_one :supplier, serializer: Suppliers::SupplierSerializer
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user