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)

[((10, 9, 10, 38), 'kim.field.Integer', 'field.Integer', (), '', False, 'from kim import Mapper, field\n'), ((11, 11, 11, 25), 'kim.field.String', 'field.String', ({}, {}), '()', False, 'from kim import Mapper, field\n'), ((12, 18, 12, 32), 'kim.field.String', 'field.String', ({}, {}), '()', False, 'from kim import Mapper, field\n'), ((13, 17, 13, 47), 'kim.field.DateTime', 'field.DateTime', (), '', False, 'from kim import Mapper, field\n'), ((20, 9, 20, 38), 'kim.field.Integer', 'field.Integer', (), '', False, 'from kim import Mapper, field\n'), ((21, 11, 21, 25), 'kim.field.String', 'field.String', ({}, {}), '()', False, 'from kim import Mapper, field\n'), ((22, 17, 22, 47), 'kim.field.DateTime', 'field.DateTime', (), '', False, 'from kim import Mapper, field\n')]