<commit_before># A file attached to a project.
#
# Possibly belongs to a task (attachment), or a ProjectFolder

class ProjectFile < ActiveRecord::Base
  has_attached_file :file, :styles=>{ :thumbnail=>"124x124"}, :path => File.join("#{RAILS_ROOT}", 'store') + "/:id_:basename_:style.:extension"

  FILETYPE_IMG          = 1

  FILETYPE_DOC          = 5
  FILETYPE_SWF          = 6
  FILETYPE_FLA          = 7
  FILETYPE_XML          = 8
  FILETYPE_HTML         = 9

  FILETYPE_ZIP          = 10
  FILETYPE_RAR          = 11
  FILETYPE_TGZ          = 12

  FILETYPE_MOV          = 13
  FILETYPE_AVI          = 14

  FILETYPE_TXT          = 16
  FILETYPE_XLS          = 17

  FILETYPE_AUDIO        = 18

  FILETYPE_ISO          = 19
  FILETYPE_CSS          = 20
  FILETYPE_SQL          = 21

  FILETYPE_ASF          = 22
  FILETYPE_WMV          = 23

  FILETYPE_UNKNOWN      = 99

  belongs_to    :project
  belongs_to    :company
  belongs_to    :customer
  belongs_to    :user
  belongs_to    :task

  belongs_to    :project_folder

  has_many   :event_logs, :as => :target, :dependent => :destroy

  after_create { |r|
    l = r.event_logs.new<commit_msg>Remove unused constants from ProjectFile.<commit_after># A file attached to a project.
#
# Possibly belongs to a task (attachment), or a ProjectFolder

class ProjectFile < ActiveRecord::Base
  has_attached_file :file, :styles=>{ :thumbnail=>"124x124"}, :path => File.join("#{RAILS_ROOT}", 'store') + "/:id_:basename_:style.:extension"

  FILETYPE_IMG          = 1

  belongs_to    :project
  belongs_to    :company
  belongs_to    :customer
  belongs_to    :user
  belongs_to    :task

  belongs_to    :project_folder

  has_many   :event_logs, :as => :target, :dependent => :destroy

  after_create { |r|
    l = r.event_logs.new
{'fraction_non_alphanumeric': 0.0929451287793953, 'fraction_numerical': 0.02631578947368421, 'mean_word_length': 2.4168260038240916, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 13, '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': '1278120', 'n_tokens_mistral': 652, 'n_tokens_neox': 596, 'n_words': 143}