예제 #1
0
파일: schemas.py 프로젝트: Owez/zinharo-api
class ReportGetSchema(ma.Schema):
    """Schema for querying for a report"""

    id = ma.Integer(required=True)

    class Meta:
        strict = True
예제 #2
0
파일: schemas.py 프로젝트: Owez/zinharo-api
class HashGetSchema(ma.Schema):
    """Schema for fetching a hash, it can use any one of the three shown below"""

    id = ma.Integer(required=False)
    password = ma.String(required=False)

    class Meta:
        strict = True
예제 #3
0
파일: schemas.py 프로젝트: Owez/zinharo-api
class JobPostSchema(ma.Schema):
    """Schema for finishing a job"""

    id = ma.Integer(required=True)
    password = ma.String(required=True)

    class Meta:
        strict = True
예제 #4
0
파일: schemas.py 프로젝트: Owez/zinharo-api
class ReportPostSchema(ma.Schema):
    """Schema for adding a report"""

    hash_id = ma.Integer(required=True)
    info = ma.String(required=False)

    class Meta:
        strict = True
예제 #5
0
class ClientGetSchema(ma.Schema):
    """Schema for querying for a client"""

    id = ma.Integer(required=False)
    username = ma.String(required=False)

    class Meta:
        strict = True
예제 #6
0
파일: schemas.py 프로젝트: Owez/zinharo-api
class HashDeleteSchema(ma.Schema):
    """Schema for deleting a hash, it can use any one of the three shown below,
    similar to HashGetSchema"""

    id = ma.Integer(required=False)
    password = ma.String(required=False)

    class Meta:
        strict = True