import datetime


class Debt:

    def __init__(self, id, name):
        self.id = id
        self.name = name

    @classmethod
    def from_dict(cls, adict):
        return Debt(id=adict['id'], name=adict['name'])

    def to_dict(self):
        adict = {'id': self.id, 'name': self.name}
        return adict


class DebtItem:

    def __init__(self, id, debt_id, date, sum, text):
        self.id = id
        self.debt_id = debt_id
        self.date = date.strftime('%Y-%m-%d') if type(date
            ) is datetime.date else date
        self.sum = sum
        self.text = text

    @classmethod
    def from_dict(cls, adict):
        return DebtItem(id=adict['id'], debt_id=adict['debt_id'], date=
            adict['date'], sum=adict['sum'], text=adict['text'])

    def to_dict(self):
        adict = {'id': self.id, 'debt_id': self.debt_id, 'date': self.date,
            'sum': self.sum, 'text': self.text}
        return adict

6f39427e0c8e84c175417677d0de33abf76a6924
<mask token>


class Debt:
    <mask token>
    <mask token>
    <mask token>


class DebtItem:

    def __init__(self, id, debt_id, date, sum, text):
        self.id = id
        self.debt_id = debt_id
        self.date = date.strftime('%Y-%m-%d') if type(date
            ) is datetime.date else date
        self.sum = sum
        self.text = text

    @classmethod
    def from_dict(cls, adict):
        return DebtItem(id=adict['id'], debt_id=adict['debt_id'], date=
            adict['date'], sum=adict['sum'], text=adict['text'])

    def to_dict(self):
        adict = {'id': self.id, 'debt_id': self.debt_id, 'date': self.date,
            'sum': self.sum, 'text': self.text}
        return adict

<mask token>


class Debt:
    <mask token>
    <mask token>

    def to_dict(self):
        adict = {'id': self.id, 'name': self.name}
        return adict


class DebtItem:

    def __init__(self, id, debt_id, date, sum, text):
        self.id = id
        self.debt_id = debt_id
        self.date = date.strftime('%Y-%m-%d') if type(date
            ) is datetime.date else date
        self.sum = sum
        self.text = text

    @classmethod
    def from_dict(cls, adict):
        return DebtItem(id=adict['id'], debt_id=adict['debt_id'], date=
            adict['date'], sum=adict['sum'], text=adict['text'])

    def to_dict(self):
        adict = {'id': self.id, 'debt_id': self.debt_id, 'date': self.date,
            'sum': self.sum, 'text': self.text}
        return adict

<mask token>


class Debt:

    def __init__(self, id, name):
        self.id = id
        self.name = name

    @classmethod
    def from_dict(cls, adict):
        return Debt(id=adict['id'], name=adict['name'])

    def to_dict(self):
        adict = {'id': self.id, 'name': self.name}
        return adict


class DebtItem:

    def __init__(self, id, debt_id, date, sum, text):
        self.id = id
        self.debt_id = debt_id
        self.date = date.strftime('%Y-%m-%d') if type(date
            ) is datetime.date else date
        self.sum = sum
        self.text = text

    @classmethod
    def from_dict(cls, adict):
        return DebtItem(id=adict['id'], debt_id=adict['debt_id'], date=
            adict['date'], sum=adict['sum'], text=adict['text'])

    def to_dict(self):
        adict = {'id': self.id, 'debt_id': self.debt_id, 'date': self.date,
            'sum': self.sum, 'text': self.text}
        return adict

import datetime


class Debt:

    def __init__(self, id, name):
        self.id = id
        self.name = name

    @classmethod
    def from_dict(cls, adict):
        return Debt(id=adict['id'], name=adict['name'])

    def to_dict(self):
        adict = {'id': self.id, 'name': self.name}
        return adict


class DebtItem:

    def __init__(self, id, debt_id, date, sum, text):
        self.id = id
        self.debt_id = debt_id
        self.date = date.strftime('%Y-%m-%d') if type(date
            ) is datetime.date else date
        self.sum = sum
        self.text = text

    @classmethod
    def from_dict(cls, adict):
        return DebtItem(id=adict['id'], debt_id=adict['debt_id'], date=
            adict['date'], sum=adict['sum'], text=adict['text'])

    def to_dict(self):
        adict = {'id': self.id, 'debt_id': self.debt_id, 'date': self.date,
            'sum': self.sum, 'text': self.text}
        return adict
