Upgrade to ExtJS 4.0.0 - Released 04/26/2011
[extjs.git] / examples / app / nested-loading / app / model / Book.js
diff --git a/examples/app/nested-loading/app/model/Book.js b/examples/app/nested-loading/app/model/Book.js
new file mode 100644 (file)
index 0000000..59bcc9d
--- /dev/null
@@ -0,0 +1,18 @@
+/**
+ * Model for a book
+ */
+Ext.define('Books.model.Book', {
+    extend: 'Ext.data.Model',
+    requires: ['Books.model.Review', 'Ext.data.HasManyAssociation', 'Ext.data.BelongsToAssociation'],
+
+    fields: [
+        'id',
+        'name',
+        'author',
+        'detail',
+        'price',
+        'image'
+    ],
+
+    hasMany: {model: 'Books.model.Review', name: 'reviews'}
+});