from kim import Mapper, field

from example.models import Planet, Character


class PlanetMapper(Mapper):

    __type__ = Planet

    id = field.Integer(read_only=True)
    name = field.String()
    description = field.String()
    created_at = field.DateTime(read_only=True)


class CharacterMapper(Mapper):

    __type__ = Character

    id = field.Integer(read_only=True)
    name = field.String()
    created_at = field.DateTime(read_only=True)

[((139, 168), 'kim.field.Integer', 'field.Integer', ([], {'read_only': '(True)'}), '(read_only=True)\n', (152, 168), False, 'from kim import Mapper, field\n'), ((180, 194), 'kim.field.String', 'field.String', ([], {}), '()\n', (192, 194), False, 'from kim import Mapper, field\n'), ((213, 227), 'kim.field.String', 'field.String', ([], {}), '()\n', (225, 227), False, 'from kim import Mapper, field\n'), ((245, 275), 'kim.field.DateTime', 'field.DateTime', ([], {'read_only': '(True)'}), '(read_only=True)\n', (259, 275), False, 'from kim import Mapper, field\n'), ((345, 374), 'kim.field.Integer', 'field.Integer', ([], {'read_only': '(True)'}), '(read_only=True)\n', (358, 374), False, 'from kim import Mapper, field\n'), ((386, 400), 'kim.field.String', 'field.String', ([], {}), '()\n', (398, 400), False, 'from kim import Mapper, field\n'), ((418, 448), 'kim.field.DateTime', 'field.DateTime', ([], {'read_only': '(True)'}), '(read_only=True)\n', (432, 448), False, 'from kim import Mapper, field\n')]