Skip to content

Commit

Permalink
Add User model based on the GivingLab API
Browse files Browse the repository at this point in the history
  • Loading branch information
kynan committed Jan 26, 2013
1 parent ac580d6 commit 03bd7af
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions app/models/user.coffee
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
Spine = require('spine')

class User extends Spine.Model
@configure 'User', 'ID', 'Forename', 'Surname', 'EmailAddress', 'Tag', 'FacebookID', 'ProfilePictureUrl', 'TotalRaised', 'TotalDonated', 'Events', 'Groups', 'Bio'
@extend Spine.Model.Local
validate: ->
return 'Forename required' unless @Forename
return 'Surname required' unless @Surname
return 'Email required' unless @Email
return 'Password required' unless @Password

module.exports = User

0 comments on commit 03bd7af

Please sign in to comment.