コード例 #1
0
class BookMapper(Mapper):
    title = RawField()
    price = RawField()
    hoge = NonKeyField()

    def filter_hoge(self):
        return self.options['hoge']
コード例 #2
0
class TeacherMapper(ModelMapper):
    goodCount = RawField('good_count')
    badCount = RawField('bad_count')

    class Meta:
        model = Teacher
        exclude = ('good_count', 'bad_count', 'subject')
コード例 #3
0
class BookMapper(Mapper):
    title = RawField()
    price = RawField()
    author = DelegateField(AuthorMapper)

    # priceをfloat型に変換
    def filter_price(self, value):
        return float(value)
コード例 #4
0
class TaskMapper(Mapper):
    uid = RawField('_uid')
    script = RawField('_script')
    script_args = RawField('_script_args')
    ignore_result = RawField('_ignore_result')
    task_args = RawField('_task_args')
    result = RawField('_result')
    status = RawField('_status')
コード例 #5
0
class BookMapper(Mapper):
    title = RawField()
    price = RawField()
    author = DelegateField(AuthorMapper)
コード例 #6
0
class AuthorMapper(Mapper):
    name = RawField()
    company = RawField()
コード例 #7
0
class PlayerMapper(Mapper):
    Name = RawField('name')
    Generation = RawField('generation')
    Level = RawField('level')
コード例 #8
0
class AuthorMapper(Mapper):
    name = RawField()
    company = RawField()
    cp_code = RawField('company_code')
コード例 #9
0
class BookMapper(Mapper):
    title = RawField()
    price = RawField()
    author = RawField()
コード例 #10
0
class ItemMapper(ResouceMapper):
    item_id = RawField('id')
    item_name = RawField('name')
コード例 #11
0
class ResouceMapper(Mapper):
    resource_uri = RawField()
コード例 #12
0
class BookMapper(Mapper):
    title = RawField()
    price = RawField()
    author = DelegateField(AuthorMapper)
    cp_code = RawField('author.company_code')
コード例 #13
0
class SubjectMapper(ModelMapper):
    isHot = RawField('is_hot')

    class Meta:
        model = Subject
        exclude = ('is_hot', )
コード例 #14
0
class BookMapper(Mapper):
    title = RawField()
    price = RawField()
    author = DelegateField(AuthorMapper, attach_parent=True)
コード例 #15
0
class ItemMapper(Mapper):
    item_id = RawField('id')
    item_name = RawField('name')
    item_price = RawField('price')
コード例 #16
0
class CommentMapper(Mapper):
    author = RawField()
    text = RawField()