Add doc blocks for bundles example miniapp

This commit is contained in:
Roman Mogylatov 2017-12-25 14:38:53 +02:00
parent 1c6160e827
commit bb390f51f0
4 changed files with 20 additions and 1 deletions

View File

@ -1,2 +1,5 @@
"""Photos bundle entities module."""
class Photo(object): class Photo(object):
pass """Photo entity."""

View File

@ -1,6 +1,11 @@
"""Photos bundle entity repositories module."""
class PhotoRepository(object): class PhotoRepository(object):
"""Photo entity repository."""
def __init__(self, object_factory, fs, db): def __init__(self, object_factory, fs, db):
"""Initializer."""
self.object_factory = object_factory self.object_factory = object_factory
self.fs = fs self.fs = fs
self.db = db self.db = db

View File

@ -1,4 +1,9 @@
"""Users bundle entities module."""
class User(object): class User(object):
"""User entity."""
def __init__(self, id): def __init__(self, id):
"""Initializer."""
self.id = id self.id = id

View File

@ -1,8 +1,14 @@
"""Users bundle entity repositories module."""
class UserRepository(object): class UserRepository(object):
"""User entity repository."""
def __init__(self, object_factory, db): def __init__(self, object_factory, db):
"""Initializer."""
self.object_factory = object_factory self.object_factory = object_factory
self.db = db self.db = db
def get(self, id): def get(self, id):
"""Return user entity with given identifier."""
return self.object_factory(id=id) return self.object_factory(id=id)