class Users::ProductCategorySerializer
  FEATURED_NAMES = %w[
    featured
  ]
  include Qwaiter::UserBaseSerializer
  attributes :name, :supplier_id, :active_on_sunday, :active_on_monday, :active_on_tuesday, :active_on_wednesday,
    :active_on_thursday, :active_on_friday, :active_on_saturday, :full_day, :start_from, :end_on,
    :position
  attribute(:collapsed){ FEATURED_NAMES.exclude? object.name.to_s.downcase }
  has_many :products, serializer: Users::ProductSerializer
  has_one :supplier, serializer: Users::SupplierSerializer
end
