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()
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)
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)
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)
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)
class HandlerSchema(ma.Schema): id = ma.Integer(only_load=True) about = ma.String() cmd = ma.String()
class SubscriberSchema(ma.Schema): id = ma.Integer(only_load=True) event_type = ma.String() handler_id = ma.Integer()
class EventSchema(ma.Schema): id = ma.Integer(only_load=True) dt = ma.String() event_type = ma.String() payload = ma.String() state = ma.Integer()