<commit_before>/**
 * Created with IntelliJ IDEA.
 * User: pat
 * Date: 12-05-10
 * Time: 2:15 PM
 * To change this template use File | Settings | File Templates.
 */
define(['underscore', 'backbone', '../lib/utility', '../lib/backbone-utility', '../lib/backbone-couch-schema-model', '../lib/backbone.couchdb'],
    function (_, Backbone, Utility, BackboneUtility, BackboneCouchSchemaModel, Backbone) {

  var TodoApp = {
    Models:{},
    Collections:{},
    Routers:{},
    App: {
      router: false
    }
  };

  TodoApp.Models.Todo = BackboneCouchSchemaModel.extend({
    // TODO Introduce a app-config dependency that contains all the configuration options of the application, such as the url of the couchdb server
    defaults: {
      type: 'todo',
      name: ''
    },
    schema:{
      description:'Todo item',
      type:'todo',
      properties:{
        name:{
          title:'Name',
          type:'string',
          required:true,
          'default':'What needs to be done?'
        },
        description:{
          title:'Description',
          type:'string'
        },
        createdAt:{
          title:'Creation date',
          type:'string',
          format: 'date-time'
        },
        completedAt:{
          title:'Completion date',
          type:'string',
          format: 'date-time'
        }
      }
    }
  });<commit_msg>Removing defaults 'name' field, it already puts the backbone model in an invalid state.. which is no good<commit_after>/**
 * Created with IntelliJ IDEA.
 * User: pat
 * Date: 12-05-10
 * Time: 2:15 PM
 * To change this template use File | Settings | File Templates.
 */
define(['underscore', 'backbone', '../lib/utility', '../lib/backbone-utility', '../lib/backbone-couch-schema-model', '../lib/backbone.couchdb'],
    function (_, Backbone, Utility, BackboneUtility, BackboneCouchSchemaModel, Backbone) {

  var TodoApp = {
    Models:{},
    Collections:{},
    Routers:{},
    App: {
      router: false
    }
  };

  TodoApp.Models.Todo = BackboneCouchSchemaModel.extend({
    // TODO Introduce a app-config dependency that contains all the configuration options of the application, such as the url of the couchdb server
    defaults: {
      type: 'todo'
    },
    schema:{
      description:'Todo item',
      type:'todo',
      properties:{
        name:{
          title:'Name',
          type:'string',
          required:true,
          'default':'What needs to be done?'
        },
        description:{
          title:'Description',
          required: false,
          type:'string'
        },
        createdAt:{
          title:'Creation date',
          type:'string',
          format: 'date-time'
        },
        completedAt:{
          title:'Completion date',
          type:'string',
          format: 'date-time'
        }
      }
    }
  });
{'fraction_non_alphanumeric': 0.137116672541417, 'fraction_numerical': 0.00634473034896017, 'mean_word_length': 2.105032822757112, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '6243704', 'n_tokens_mistral': 831, 'n_tokens_neox': 807, 'n_words': 214}