Esempio n. 1
0
class IssueHistorySchema(ma.Schema):
    id = ma.Integer(only_load=True)
    issue_id = ma.Integer()
    status_id = ma.Integer()
    customer_id = ma.Integer()
    create_time = ma.String()
    reason = ma.String()
    note = ma.String()
Esempio n. 2
0
class StatusSchema(ma.Schema):
    id = ma.Integer(only_load=True)
    name = ma.String()
    description = ma.String()

    def __repr__(self):
        return '<StatusSchema {name}>'.format(id=self.name)
Esempio n. 3
0
class TallySheet_PRE_41_Schema(ma.ModelSchema):
    class Meta:
        fields = (
            "tallySheetId",
            "code",
            "electionId",
            "officeId",
            "latestVersionId",

            "tallySheetVersionId",
            "createdBy",
            "createdAt",

            "electoralDistrictId",
            "pollingDivisionId",
            "countingCentreId",
            "party_wise_results",
        )

        model = TallySheetPRE41Model
        # optionally attach a Session
        # to use for deserialization
        sqla_session = db.session

    createdBy = ma.Integer()
    createdAt = ma.String()

    party_wise_results = ma.Nested(TallySheet_PRE_41__party_Schema, many=True)
Esempio n. 4
0
class CategorySchema(ma.Schema):
    id = ma.Integer(only_load=True)
    name = ma.String()
    image_name = ma.String()
    description = ma.String()

    def __str__(self):
        return self.name

    def __repr__(self):
        return '<CategorySchema {id}>'.format(id=self.id)
Esempio n. 5
0
class IssueSchema(ma.Schema):
    id = ma.Integer(only_load=True)
    status_id = ma.Integer()
    category_id = ma.Integer()
    customer_id = ma.Integer()
    management_id = ma.Integer()
    body = ma.String()
    create_data = ma.String()
    rating = ma.Integer()
    contractor = ma.String()
    contractor_id = ma.Integer()

    def __repr__(self):
        return '<IssueSchema {id}>'.format(id=self.id)
Esempio n. 6
0
class HandlerSchema(ma.Schema):
    id = ma.Integer(only_load=True)
    about = ma.String()
    cmd = ma.String()
Esempio n. 7
0
class SubscriberSchema(ma.Schema):
    id = ma.Integer(only_load=True)
    event_type = ma.String()
    handler_id = ma.Integer()
Esempio n. 8
0
class EventSchema(ma.Schema):
    id = ma.Integer(only_load=True)
    dt = ma.String()
    event_type = ma.String()
    payload = ma.String()
    state = ma.Integer()