Exemplo n.º 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()
Exemplo n.º 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())
Exemplo n.º 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)
Exemplo n.º 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>')
Exemplo n.º 5
0
class KeySchema(ma.Schema):
    key = ma.String(required = True)
    href = ma.URLFor('key_ep', user_id = '<user.id>')
Exemplo n.º 6
0
class UserSignInSchema(ma.Schema):
    email = ma.String(required = True)
    password = ma.String(required = True)
Exemplo n.º 7
0
class RoledUserSchema(UserSchema):
    role = ma.String(validate = validate_role)
Exemplo n.º 8
0
class PasswordedUserSchema(UserSchema):
    password = ma.String(required = True)
Exemplo n.º 9
0
class UserHostApplicationSchema(ma.Schema):
    application = ma.String(required = True)
    isApproved = ma.Boolean(attribute = 'is_approved')
Exemplo n.º 10
0
class AuthenticationSchema(ma.Schema):
    key = ma.String(attribute = 'Authorization-API-Key', required = True)