 _       = require 'underscore'
 User    = require '../../lib/argumenta/user'
 Commit  = require '../../lib/argumenta/objects/commit'
+Errors  = require '../../lib/argumenta/errors'
 
 #
 # Discussion represents a conversation about a published argument.

    @creator       = params.creator
    @createdAt     = params.createdAt     ? params.created_at
    @updatedAt     = params.updatedAt     ? params.updated_at
    @comments      = params.comments

  # Gets a plain object with discussion data.
  #


  @validateTargetType: (targetType) ->
    unless _.isString targetType
      throw new @ValidationError "Discussion target type must be a string."

    unless targetType is 'argument'
      throw new @ValidationError "Discussion target must be an argument."

    return true

