<commit_before>import DS from 'ember-data';

var Proposal = DS.Model.extend({
  type: DS.attr("string"),
  user: DS.belongsTo("user"),
  word: DS.belongsTo("word", {async: true}),
  wordName: DS.attr("string"),
  reason: DS.attr("string"),
  state: DS.attr("string"),
  wordnet: DS.attr("boolean"),
  createdAt: DS.attr("date"),
  tally: DS.attr("number"),
  votes: DS.hasMany("vote"),
  activities: DS.hasMany("activity"),
  flagged: DS.attr("boolean"),

  // NewWord
  meanings: DS.attr(),

  // MeaningLike
  def: DS.attr("string"),
  example: DS.attr("string"),

  // ChangeMeaning
  meaning: DS.belongsTo("meaning"),
  original: DS.attr(),
  parentId: DS.attr(),

  // NewMeaning
  pos: DS.attr("string"),

  types: ["NewWord", "NewMeaning", "MeaningChange"],

  sortOrder: function() {
    var time = this.get("createdAt").getMilliseconds();
    if(this.get("state") === "open") {
      return time + 10000000000000000000000;
    } else {
      return time;
    }
  }.property("createdAt", "state"),

  typeName: function() {
    if(this.get("type") === "NewWord") {
      return "New Word";
    } else if(this.get("type") === "NewMeaning") {
      return "New Meaning";
    } else if(this.get("type") === "MeaningChange") {
      return "Change";
    }
  }.property("type"),<commit_msg>fixes<commit_after>import DS from 'ember-data';

var Proposal = DS.Model.extend({
  type: DS.attr("string"),
  user: DS.belongsTo("user"),
  word: DS.belongsTo("word", {async: true}),
  wordName: DS.attr("string"),
  reason: DS.attr("string"),
  state: DS.attr("string"),
  wordnet: DS.attr("boolean"),
  createdAt: DS.attr("date"),
  tally: DS.attr("number"),
  votes: DS.hasMany("vote"),
  activities: DS.hasMany("activity"),
  flagged: DS.attr("boolean"),

  // NewWord
  meanings: DS.attr(),

  // MeaningLike
  def: DS.attr("string"),
  example: DS.attr("string"),

  // ChangeMeaning
  meaning: DS.belongsTo("meaning"),
  original: DS.attr(),
  parentId: DS.attr(),

  // NewMeaning
  pos: DS.attr("string"),

  types: ["NewWord", "NewMeaning", "MeaningChange"],

  sortOrder: function() {
    if(this.get("createdAt")) {
      var time = this.get("createdAt").getMilliseconds();
      if(this.get("state") === "open") {
        return time + 10000000000000000000000;
      } else {
        return time;
      }
    } else {
      return 0;
    }
  }.property("createdAt", "state"),

  typeName: function() {
    if(this.get("type") === "NewWord") {
      return "New Word";
    } else if(this.get("type") === "NewMeaning") {
      return "New Meaning";
    } else if(this.get("type") === "MeaningChange") {
      return "Change";
    }
  }.property("type"),
{'fraction_non_alphanumeric': 0.20624764772299586, 'fraction_numerical': 0.017689123071132858, 'mean_word_length': 3.5050847457627117, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 2, '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': '6501418', 'n_tokens_mistral': 966, 'n_tokens_neox': 902, 'n_words': 181}