Created
December 3, 2015 15:12
-
-
Save ashleycoker/d4b433a0af61b97f8c51 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Ext.define('School.model.Student', | |
{ | |
extend: 'Ext.data.Model', | |
requires:['School.model.Course'], | |
idProperty : 'id', | |
fields : [{ | |
name : 'id', | |
type : 'int' | |
}, | |
{ | |
name : 'firstName', | |
type : 'string' | |
}, | |
{ | |
name : 'middleName', | |
type : 'string' | |
}, | |
{ | |
name : 'lastName', | |
type : 'string' | |
}, | |
{ | |
name : 'birthDate', | |
type : 'date' | |
}, | |
{ | |
name : 'address1', | |
type : 'string' | |
}, | |
{ | |
name : 'address2', | |
type : 'string' | |
}, | |
{ | |
name : 'city', | |
type : 'string' | |
}, | |
{ | |
name : 'state', | |
type : 'string' | |
}], | |
hasMany : [{ | |
model : 'School.model.Course', | |
name : 'Courses' | |
}], | |
proxy : | |
{ | |
type : 'ajax', | |
idParam : 'id', | |
id : 'senchatest', | |
reader : | |
{ | |
type : 'json' | |
} | |
, | |
api : | |
{ | |
read : '/Service/index.php/students' | |
} | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment