-{Model} = require 'bongo'
+JCampaign = require './campaign'
+{Model}  = require 'bongo'
 
 module.exports = class JWFGH extends Model
-
-  CAP       = 50000
-  PRIZE     = 10000
-  DEADLINE  = new Date 1418626800000 # Mon, 15 Dec 2014 00:00:00 PDT
 
   {signature, secure} = require 'bongo'
   @share()

    indexes       :
      username    : 'unique'
      approved    : 'unique'
    schema        :
      username    :
        type      : String


    return callback message : 'No username received!'  unless username

    JCampaign.get 'WFGH', (err, campaign) ->

      return callback message : 'expired'  if err or not campaign

      JWFGH.one {username}, (err, data)->

        return callback err  if err

        return callback message : 'Already applied'  if data

        application = new JWFGH {username}

        application.save (err)->
          return callback err if err
          JWFGH.getStats account, callback


  @leave = (account, callback) ->
