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