class Meta: param_fields = ( ('encrypted_data', fields.CharField( help_text='完整用户信息的加密数据', required=False, default=None, omit=None )), ('iv', fields.CharField(help_text='加密算法的初始向量', required=False, default=None, omit=None)), )
class Meta: path = '/' param_fields = ( ('channel', fields.CharField(help_text='App Channel', required=False)), ('version', fields.CharField(help_text='App Version', required=False)), )
class Meta: param_fields = ( ('name', fields.CharField(help_text='名称', max_length=64)), ('description', fields.CharField(help_text='描述', max_length=255)), ('create_user_manager', fields.BooleanField( help_text='创建人管理权限', required=False, default=False, omit=False )), )
class Meta: param_fields = ( ('room_id', fields.IntegerField(help_text='会议室ID')), ('name', fields.CharField(help_text='名称', max_length=64)), ('description', fields.CharField(help_text='描述', max_length=255, required=False, default="", omit="")), ('date', fields.DateField(help_text='预定日期')), ('start_time', fields.TimeField(help_text='开始时间')), ('end_time', fields.TimeField(help_text='结束时间')), )
class Meta: param_fields = ( ('room_id', fields.IntegerField(help_text='会议室ID')), ('name', fields.CharField(help_text='名称', max_length=64)), ('description', fields.CharField(help_text='描述', max_length=255, required=False, default="", omit="")), ('create_user_manager', fields.NullBooleanField( help_text='创建人管理权限', required=False, default=None, omit=None )), )
class Meta: path = "suite/callback/(?P<suite_key>[0-9a-zA-Z]+)" param_fields = (('timestamp', fields.CharField(help_text='timestamp', required=True)), ('nonce', fields.CharField(help_text='nonce', required=True)), ('signature', fields.CharField(help_text='signature', required=True)))
class Meta: param_fields = ( ('name', fields.CharField(help_text='名称', max_length=64)), ('description', fields.CharField(help_text='描述', max_length=255, required=False, default="", omit="")), )
class CorpAgentMixin(object): param_fields = ( ('corp_id', fields.CharField(help_text='corp_id', required=True)), ('app_id', fields.IntegerField(help_text='app_id', required=True)), ) @classmethod def get_corp_agent_info(cls, request): corp_agent_id = cache.CorpAgentCache.get( "%s|||%s" % (request.params.app_id, request.params.corp_id)) if corp_agent_id is not None: corp_agent = models.CorpAgent.get_obj_by_pk_from_cache( corp_agent_id) if corp_agent is not None and corp_agent.delete_status == core_constants.DELETE_CODE.NORMAL.code: return corp_agent cache.CorpAgentCache.delete( "%s|||%s" % (request.params.app_id, request.params.corp_id)) agent = models.Agent.get_obj_by_unique_key_from_cache( appid=request.params.app_id) if agent is None: raise CustomError(ErrCode.ERR_COMMON_BAD_PARAM) suite = agent.suite corp = models.Corp.objects.filter(corpid=request.params.corp_id, suite_id=suite.suite_key).first() if corp is None: raise CustomError(ErrCode.ERR_COMMON_BAD_PARAM) corp_agent = models.CorpAgent.objects.filter(agent_id=agent.appid, corp_id=corp.pk).first() if corp_agent is None: raise CustomError(ErrCode.ERR_COMMON_BAD_PARAM) cache.CorpAgentCache.set( "%s|||%s" % (request.params.app_id, request.params.corp_id), corp_agent.pk) return corp_agent
class Meta: param_fields = ( ('name', fields.CharField(help_text='名称', max_length=64)), ('description', fields.CharField(help_text='描述', max_length=255)), )
class Meta: param_fields = (('js_code', fields.CharField(help_text='小程序登录code', required=True)), )
class Meta: param_fields = CorpAgentMixin.param_fields + ( ('code', fields.CharField(help_text='code', required=True)), )