示例#1
0
class LoungeSchema(ma.Schema):
    dateTime = ma.DateTime(attribute = 'date_time', required = True)
    location = ma.String()
    community = ma.String()
    isReserved = ma.Boolean(attribute = 'is_reserved', required = True)
    topic = ma.String()
    summary = ma.String()
示例#2
0
class UserSchema(ma.Schema):
    email = ma.Email(required = True)
    firstName = ma.String(attribute = 'first_name', required = True)
    lastName = ma.String(attribute = 'last_name')
    bio = ma.String()
    notifications = ma.Integer(required = True)
    picture = ma.Nested(UserPictureSchema, default = dict())
    role = ma.String()
    hostApplications = ma.Nested(UserHostApplicationSchema, default = dict())
    userLounges = ma.Nested(LinkedLoungeSchema, default=dict())
示例#3
0
class UserLoungeBaseSchema(ma.Schema):
    topic = ma.String()
    summary = ma.String()
    showedUp = ma.Boolean(attribute = 'showed_up')
    isHost = ma.Boolean(attribute = 'is_host', required = True)
示例#4
0
class UserPictureSchema(ma.Schema):
    href = ma.URLFor('picture_ep', picture_id = '<id>')
    id = ma.String('picture_ep', picture_id = '<id>')
    image = ma.URLFor('picture_image_ep', picture_id = '<id>')
示例#5
0
class KeySchema(ma.Schema):
    key = ma.String(required = True)
    href = ma.URLFor('key_ep', user_id = '<user.id>')
示例#6
0
class UserSignInSchema(ma.Schema):
    email = ma.String(required = True)
    password = ma.String(required = True)
示例#7
0
class RoledUserSchema(UserSchema):
    role = ma.String(validate = validate_role)
示例#8
0
class PasswordedUserSchema(UserSchema):
    password = ma.String(required = True)
示例#9
0
class UserHostApplicationSchema(ma.Schema):
    application = ma.String(required = True)
    isApproved = ma.Boolean(attribute = 'is_approved')
示例#10
0
class AuthenticationSchema(ma.Schema):
    key = ma.String(attribute = 'Authorization-API-Key', required = True)