scinote-web/app/serializers/api/v1/project_folder_serializer.rb

18 lines
468 B
Ruby
Raw Normal View History

2020-11-23 14:09:10 +08:00
# frozen_string_literal: true
module Api
module V1
class ProjectFolderSerializer < ActiveModel::Serializer
type :project_folders
attributes :id, :name
belongs_to :team, serializer: TeamSerializer
belongs_to :parent_folder, serializer: ProjectFolderSerializer
has_many :projects, serializer: ProjectSerializer
has_many :project_folders, serializer: ProjectFolderSerializer
include TimestampableModel
2020-11-23 14:09:10 +08:00
end
end
end