Esempio n. 1
0
 def getOwned(self,
              blogId: Blog,
              creatorId: auth(User),
              typeId: PostType = None,
              offset: int = None,
              limit: int = None,
              q: QBlogPost = None) -> Iter(BlogPost):
     '''
Esempio n. 2
0
class MetaData(Entity):
    '''
    Provides the meta data that is extracted based on the content.
    '''
    Name = str
    Type = str
    Content = Reference
    Thumbnail = Reference
    SizeInBytes = int
    Creator = User
    Creator = auth(Creator)  # This is redundant, is just to keep IDE hinting.
    CreatedOn = datetime
Esempio n. 3
0
class Blog(Entity):
    '''
    Provides the blog model.
    '''
    Type = BlogType
    Language = LanguageEntity
    Creator = User; Creator = auth(Creator) # This is redundant, is just to keep IDE hinting.
    Title = str
    Description = str
    OutputLink = str
    CreatedOn = datetime
    LiveOn = datetime
    LastUpdatedOn = datetime
    ClosedOn = datetime
    UpdatedOn = datetime
Esempio n. 4
0
class Post(Entity):
    '''
    Provides the post message model.
    '''
    Type = PostType
    Creator = auth(User)
    Author = Collaborator
    IsModified = bool
    Meta = str
    ContentPlain = str
    Content = str
    CreatedOn = datetime
    PublishedOn = datetime
    UpdatedOn = datetime
    DeletedOn = datetime
    AuthorName = str
Esempio n. 5
0
 def delete(self, adminId:auth(User.Id), user:User) -> bool:
     '''
Esempio n. 6
0
 def insert(self, adminId:auth(User.Id), user:User) -> User.Id:
     '''
Esempio n. 7
0
 def getAll(self, adminId:auth(User.Id), offset:int=None, limit:int=LIMIT_DEFAULT, detailed:bool=True, q:QUser=None) -> Iter(User):
     '''
Esempio n. 8
0
 def getById(self, adminId:auth(User.Id), id:User.Id) -> User:
     '''
Esempio n. 9
0
 def insert(self, userId: auth(User.Id), content: Content) -> MetaData.Id:
     '''
Esempio n. 10
0
 def getLiveWhereAdmin(self, adminId:auth(User), languageId:LanguageEntity=None, q:QBlog=None) -> Iter(Blog):
     '''
Esempio n. 11
0
 def getAll(self, languageId:LanguageEntity=None, adminId:auth(User)=None, offset:int=None, limit:int=None,
            detailed:bool=True, q:QBlog=None) -> Iter(Blog):
     '''
Esempio n. 12
0
 def getOwned(self, blogId:Blog, creatorId:auth(User), typeId:PostType=None, offset:int=None, limit:int=None,
              q:QBlogPost=None) -> Iter(BlogPost):
     '''
Esempio n. 13
0
 def putLive(self, adminId:auth(User.Id), blogId:Blog.Id):
     '''
Esempio n. 14
0
 def getLiveWhereAdmin(self, adminId:auth(User), languageId:LanguageEntity=None, q:QBlog=None) -> Iter(Blog):
     '''
Esempio n. 15
0
 def getAll(self, languageId:LanguageEntity=None, userId:auth(User)=None, offset:int=None, limit:int=None,
            detailed:bool=True, q:QBlog=None) -> Iter(Blog):
     '''
Esempio n. 16
0
 def update(self, adminId:auth(User.Id), user:User) -> bool:
     '''
Esempio n. 17
0
 def changePassword(self, adminId:auth(User.Id), user:UserPassword):
     '''
Esempio n. 18
0
 def insert(self, userId:auth(User.Id), content:Content) -> MetaData.Id:
     '''