Created
April 13, 2010 00:49
-
-
Save pr1001/364191 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
package com.mobtest { | |
package model { | |
import net.liftweb.mapper._ | |
class User extends MegaProtoUser[User] with CreatedUpdated with OneToMany[Long, User] with ManyToMany { | |
def getSingleton = User // companion object | |
def name = niceName | |
object emailAddr extends MappedString(this, 255) | |
object isDeveloper extends MappedBoolean(this) | |
object organizations extends MappedOneToMany(Organization, Organization.owner, OrderBy(Organization.name, Ascending)) | |
object answers extends MappedOneToMany(Answer, Answer.owner) | |
object devices extends MappedOneToMany(Device, Device.owner) | |
object memberships extends MappedManyToMany(OrganizationUsers, OrganizationUsers.user, OrganizationUsers.organization, Organization) | |
} | |
object User extends User with MetaMegaProtoUser[User] { | |
override def dbTableName = "users" | |
override def fieldOrder = List(firstName, lastName, emailAddr, isDeveloper) | |
override val basePath = "user" :: Nil | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment