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