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, 'kim.field.Integer', 'field.Integer', ([], {'read_only': '(True)'}), False, 'from kim import Mapper, field\n'), (11, 'kim.field.String', 'field.String', ([], {}), False, 'from kim import Mapper, field\n'), (12, 'kim.field.String', 'field.String', ([], {}), False, 'from kim import Mapper, field\n'), (13, 'kim.field.DateTime', 'field.DateTime', ([], {'read_only': '(True)'}), False, 'from kim import Mapper, field\n'), (20, 'kim.field.Integer', 'field.Integer', ([], {'read_only': '(True)'}), False, 'from kim import Mapper, field\n'), (21, 'kim.field.String', 'field.String', ([], {}), False, 'from kim import Mapper, field\n'), (22, 'kim.field.DateTime', 'field.DateTime', ([], {'read_only': '(True)'}), False, 'from kim import Mapper, field\n')]