   id: ->
     random.char('csx') + random.int(0, 100)
 
+  listId: ->
+    if random.int(0, 10) > 6
+      return 'inbox'
+    else
+      return random.id()
+
   ids: ->
     arr = []
     len = random.int(0, 10)


  model: (model) ->
    obj = {}
    for key, value of model when key isnt 'id' and random.boolean()
      obj[key] = random[value]()
    return obj

  fullModel: (model) ->
    obj = {}
    for key, value of model when key isnt 'id'
      obj[key] = random[value]()
    return obj

  task: (event) ->
    model = models.task
    obj = if event is 'create' then random.fullModel(model) else random.model(model)
    obj.id = random.id()
    return obj

  list: (event) ->
    model = models.list
    obj = if event is 'create' then random.fullModel(model) else random.model(model)
    obj.id = random.id()
    return obj

  pref: ->

    completed: 'completed'

  list:
    id: 'listId'
    name: 'string'
    tasks: 'ids'

  pref:
    sort: 'boolean'
    night: 'string'
    language: 'string'
