Ejemplo n.º 1
0
 def getNoticeReceive(cls,
                      nid,
                      uid,
                      return_type='object') -> NoticeReceive:
     return ViewManager.getObject(NoticeReceive,
                                  ErrorType.ReceiveNotExist,
                                  notice_id=nid,
                                  user_id=uid,
                                  return_type=return_type)
Ejemplo n.º 2
0
 def getParticipation(cls,
                      uid,
                      pid,
                      return_type='object') -> Participation:
     return ViewManager.getObject(Participation,
                                  ErrorType.DoNotParticipated,
                                  return_type=return_type,
                                  user_id=uid,
                                  project_id=pid)
Ejemplo n.º 3
0
 def getFriend(cls,
               uid,
               fuid,
               accepted=True,
               return_type='object') -> User:
     return ViewManager.getObject(Friend,
                                  ErrorType.NotAFriend,
                                  return_type=return_type,
                                  subject=uid,
                                  object=fuid,
                                  accepted=accepted)
Ejemplo n.º 4
0
 def getNotice(cls, return_type='object', **args) -> Notice:
     return ViewManager.getObject(Notice,
                                  ErrorType.NoticeNotExist,
                                  return_type=return_type,
                                  **args)
Ejemplo n.º 5
0
 def getRole(cls, rid, return_type='object') -> Role:
     return ViewManager.getObject(Role,
                                  ErrorType.RoleNotExist,
                                  return_type=return_type,
                                  id=rid)
Ejemplo n.º 6
0
 def getProject(cls, return_type='object', **args) -> Project:
     return ViewManager.getObject(Project,
                                  ErrorType.ProjectNotExist,
                                  return_type=return_type,
                                  **args)
Ejemplo n.º 7
0
 def getTaskProgress(cls, return_type='object', **args) -> TaskProgress:
     return ViewManager.getObject(TaskProgress,
                                  ErrorType.ProgressReqNotExist,
                                  return_type=return_type,
                                  **args)
Ejemplo n.º 8
0
 def getTaskTake(cls, tid, uid, return_type='object') -> TaskTake:
     return ViewManager.getObject(TaskTake,
                                  ErrorType.TaskTakeNotExist,
                                  task_id=tid,
                                  user_id=uid,
                                  return_type=return_type)
Ejemplo n.º 9
0
 def getTask(cls, return_type='object', **args) -> Task:
     return ViewManager.getObject(Task,
                                  ErrorType.TaskNotExist,
                                  return_type=return_type,
                                  **args)
Ejemplo n.º 10
0
 def getUser(cls, return_type='object', **args) -> User:
     return ViewManager.getObject(User,
                                  ErrorType.UsernameNotExist,
                                  return_type=return_type,
                                  **args)