예제 #1
0
 def getTaskProgress(cls, return_type='object', **args) -> TaskProgress:
     return ViewUtils.getObject(TaskProgress,
                                ErrorType.ProgressReqNotExist,
                                return_type=return_type,
                                **args)
예제 #2
0
 def getTask(cls, return_type='object', **args) -> Task:
     return ViewUtils.getObject(Task,
                                ErrorType.TaskNotExist,
                                return_type=return_type,
                                **args)
예제 #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)
예제 #4
0
 def getUser(cls, return_type='object', **args) -> User:
     return ViewUtils.getObject(User, ErrorType.UsernameNotExist,
                                return_type=return_type, **args)
예제 #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)
예제 #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)
예제 #7
0
		def getNotice(cls, return_type='object', **args) -> Notice:
			return ViewUtils.getObject(Notice, ErrorType.NoticeNotExist,
									   return_type=return_type, **args)
예제 #8
0
		def getRole(cls, rid, return_type='object') -> Role:
			return ViewUtils.getObject(Role, ErrorType.RoleNotExist,
									   return_type=return_type, id=rid)
예제 #9
0
		def getProject(cls, return_type='object', **args) -> Project:
			return ViewUtils.getObject(Project, ErrorType.ProjectNotExist,
									   return_type=return_type, **args)
예제 #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)