<commit_before># == Schema Information
#
# Table name: projects
#
#  id          :integer          not null, primary key
#  name        :string(255)
#  description :text
#  cc          :string(10)
#  staff_id    :string(255)
#  img         :string(255)
#  created_at  :datetime
#  updated_at  :datetime
#  deleted_at  :datetime
#  status      :integer          default(0)
#  approval    :integer          default(0)
#  archived    :datetime
#  spent       :decimal(12, 2)   default(0.0)
#  budget      :decimal(12, 2)   default(0.0)
#  start_date  :datetime
#  end_date    :datetime
#
# Indexes
#
#  index_projects_on_archived    (archived)
#  index_projects_on_deleted_at  (deleted_at)
#

class ProjectSerializer < ApplicationSerializer
  attributes :id, :name, :description, :cc, :staff_id, :img, :created_at, :updated_at, :deleted_at, :status, :approval
  attributes :archived, :spent, :budget, :start_date, :end_date

  # Relationships
  has_many :project_questions
  has_many :project_answers
  has_many :groups
  has_many :alerts
  has_many :latest_alerts
  has_many :memberships
  has_many :approvals
  has_many :approvers, serializer: StaffSerializer
  has_many :services
  has_many :staff
  has_one :project_detail
end
<commit_msg>add order history method to project serializer.<commit_after># == Schema Information
#
# Table name: projects
#
#  id          :integer          not null, primary key
#  name        :string(255)
#  description :text
#  cc          :string(10)
#  staff_id    :string(255)
#  img         :string(255)
#  created_at  :datetime
#  updated_at  :datetime
#  deleted_at  :datetime
#  status      :integer          default(0)
#  approval    :integer          default(0)
#  archived    :datetime
#  spent       :decimal(12, 2)   default(0.0)
#  budget      :decimal(12, 2)   default(0.0)
#  start_date  :datetime
#  end_date    :datetime
#
# Indexes
#
#  index_projects_on_archived    (archived)
#  index_projects_on_deleted_at  (deleted_at)
#

class ProjectSerializer < ApplicationSerializer
  attributes :id, :name, :description, :cc, :staff_id, :img, :created_at, :updated_at, :deleted_at, :status, :approval, :order_history
  attributes :archived, :spent, :budget, :start_date, :end_date

  # Relationships
  has_many :project_questions
  has_many :project_answers
  has_many :groups
  has_many :alerts
  has_many :latest_alerts
  has_many :memberships
  has_many :approvals
  has_many :approvers, serializer: StaffSerializer
  has_many :services
  has_many :staff
  has_one :project_detail
end

{'fraction_non_alphanumeric': 0.09762845849802372, 'fraction_numerical': 0.01818181818181818, 'mean_word_length': 3.479646017699115, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6798949', 'n_tokens_mistral': 895, 'n_tokens_neox': 876, 'n_words': 207}