<commit_before>{Base, Model, ObjectId} = require 'bongo'

module.exports = class Relationship extends Model

  {Base, dash} = require 'bongo'

  @share()

  #TODO: implement data slugs

  @set
    softDelete:           yes
    feedable:             yes
    broadcastable:        no
    indexes:
      sourceName:         'sparse'
      sourceId:           'sparse'
      targetName:         'sparse'
      targetId:           'sparse'
      as:                 'sparse'
      timestamp:          'sparse'
    schema:
      sourceName:         String
      abstractSourceName: String
      sourceId:           ObjectId
      # sourceSlug:         String
      targetName:         String
      abstractTargetName: String
      targetId:           ObjectId
      # targetSlug:         String
      as:                 String
      data:               Object
      timestamp:
        type:             Date
        default:          -> new Date
    sharedEvents      :
      instance        : [
        { name: 'RelationshipSaved' }<commit_msg>data field should default to an empty object<commit_after>{Base, Model, ObjectId} = require 'bongo'

module.exports = class Relationship extends Model

  {Base, dash} = require 'bongo'

  @share()

  #TODO: implement data slugs

  @set
    softDelete:           yes
    feedable:             yes
    broadcastable:        no
    indexes:
      sourceName:         'sparse'
      sourceId:           'sparse'
      targetName:         'sparse'
      targetId:           'sparse'
      as:                 'sparse'
      timestamp:          'sparse'
    schema:
      sourceName:         String
      abstractSourceName: String
      sourceId:           ObjectId
      # sourceSlug:         String
      targetName:         String
      abstractTargetName: String
      targetId:           ObjectId
      # targetSlug:         String
      as:                 String
      data:
        type:             Object
        default:          -> {}
      timestamp:
        type:             Date
        default:          -> new Date
    sharedEvents      :
      instance        : [
        { name: 'RelationshipSaved' }
{'fraction_non_alphanumeric': 0.06960556844547564, 'fraction_numerical': 0.0, 'mean_word_length': 1.2742616033755274, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 6, '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': '1558609', 'n_tokens_mistral': 563, 'n_tokens_neox': 542, 'n_words': 149}