# 活动

# 新增活动

事件类型:event/add

# 回调示例

{
	"nonce": "d9d94ba3-57e9-4049-8724-f86f4e5f0fxx",
	"timestamp": 1701744489,
	"sign": "4881480964032cbc51f39a08797d806c4cbf9cxx",
	"action": "event\/add",
	"attributes": {
		"event_id": "b80bb752931811eeaeb42ef5b77e53xx",
		"title": "新建活动回调",
		"summary": "参加活动",
		"content": "<p>参加活动<\/p>",
		"location": "北京",
		"started_at": "2023-12-05 10:47:00",
		"ended_at": "2023-12-07 10:47:00",
		"closed_at": "2023-12-06 10:47:00",
		"created_at": "2023-12-05 10:48:07",
		"attend_start_at": "2023-12-05 10:47:00",
		"attend_end_at": "2023-12-07 10:47:00",
		"attend_method": "qrcode",
		"participant_count_limit": 1,
		"app_source_type": "event",
		"enable_random_extract": 0,
		"privilege_type": 1,
		"privilege": [{
			"type": "department",
			"id": "1"
		}, {
			"type": "staff",
			"id": "StaffID1"
		},  {
			"type": "contacttag",
			"id": "f31993b6a29511ecabb6e6ac26dccxxx"
		}],
		"logo": "",
		"team_id ": "30fff19ebae611ecad5bee5022d7cxxx",
		"category_id": "5939f99e9f4211eca5914ac6b68baxxx",
		"roadmap_id": 0
	},
	"operator": "StaffID2",
	"operator_info": {
		"name": "StaffID2"
	}
}
# 参数说明:
参数 说明
nonce 用户触发的事件临时码
timestamp 用户触发的事件时间戳
sign 用户触发的事件签名
action 用户触发的事件行为类型
attributes.event_id 新增活动的实体id
attributes.title 活动的标题
attributes.summary 活动的详情摘要
attributes.content 活动详情
attributes.location 活动地点
attributes.started_at 活动的开始时间
attributes.ended_at 活动的截止时间
attributes.closed_at 活动报名截止时间
attributes.created_at 活动的创建时间
attributes.attend_start_at 活动签到开始时间
attributes.attend_end_at 活动签到截止时间
attributes.attend_method 活动签到方式
attributes.participant_count_limit 活动的人数限制,为null表示没有限制
attributes.enable_random_extract 报名方式;true:表示随机抽取;false:表示排队报名 当participant_count_limitnull时,默认为false该参数无意义
attributes.app_source_type 应用来源:event,活动;roadmap项目
attributes.privilege_type 活动的公开情况,0表示公开,1表示非公开,2表示仅创建者可见
attributes.privilege 活动成员范围(包含成员,部门,标签)
attributes.team_id 活动关联的k吧实体id
attributes.category_id 活动关联的分类实体id
attributes.roadmap_id 活动关联的项目实体id
attributes.logo 活动的封面图片地址
attributes.operator 触发者StaffID
attributes.operator_info.name 触发者姓名

# 编辑活动

事件类型:event/edit

# 回调示例

{
	"nonce": "d9798542-5044-488e-a0ab-0c7100f7f9xx",
	"timestamp": 1701762177,
	"sign": "9db5b1416a092d1331dce57e6862d6b13ee0c7xx",
	"action": "event\/edit",
	"attributes": {
		"event_id": "b80bb752931811eeaeb42ef5b77e53xx",
		"title": "新建活动回调",
		"summary": "参加活动",
		"content": "<p>参加活动<\/p>",
		"location": "北京",
		"started_at": "2023-12-05 10:47:00",
		"ended_at": "2023-12-07 10:47:00",
		"closed_at": "2023-12-06 10:47:00",
		"created_at": "2023-12-05 10:48:07",
		"attend_start_at": "2023-12-05 10:47:00",
		"attend_end_at": "2023-12-07 10:47:00",
		"attend_method": "qrcode",
		"participant_count_limit": 1,
		"app_source_type": "event",
		"enable_random_extract": 0,
		"privilege_type": 1,
		"privilege": [{
			"type": "department",
			"id": "1"
		}, {
			"type": "staff",
			"id": "StaffID1"
		}, {
			"type": "contacttag",
			"id": "f31993b6a29511ecabb6e6ac26dccxxx"
		}],
		"logo": "",
		"team_id ": "30fff19ebae611ecad5bee5022d7cxxx",
		"category_id": "5939f99e9f4211eca5914ac6b68baxxx",
		"roadmap_id": 0
	},
	"operator": "StaffID2",
	"operator_info": {
		"name": "StaffID2"
	}
}
# 参数说明:
参数 说明
nonce 用户触发的事件临时码
timestamp 用户触发的事件时间戳
sign 用户触发的事件签名
action 用户触发的事件行为类型
attributes.event_id 编辑活动的实体id
attributes.title 活动的标题
attributes.summary 活动的详情摘要
attributes.content 活动详情
attributes.location 活动地点
attributes.started_at 活动的开始时间
attributes.ended_at 活动的截止时间
attributes.closed_at 活动报名截止时间
attributes.created_at 活动的创建时间
attributes.attend_start_at 活动签到开始时间
attributes.attend_end_at 活动签到截止时间
attributes.attend_method 活动签到方式
attributes.participant_count_limit 活动的人数限制,为null表示没有限制
attributes.enable_random_extract 报名方式;true:表示随机抽取;false:表示排队报名 当participant_count_limitnull时,默认为false该参数无意义
attributes.app_source_type 应用来源:event,活动;roadmap项目
attributes.privilege_type 活动的公开情况,0表示公开,1表示非公开,2表示仅创建者可见
attributes.privilege 活动成员范围(包含成员,部门,标签)
attributes.team_id 活动关联的k吧实体id
attributes.category_id 活动关联的分类实体id
attributes.roadmap_id 活动关联的项目实体id
attributes.logo 活动的封面图片地址
attributes.operator 触发者StaffID
attributes.operator_info.name 触发者姓名

# 删除活动

事件类型:event/delete

# 回调示例

{
	"nonce": "036b812e-d71a-4ce5-9254-1792cee051xx",
	"timestamp": 1701762357,
	"sign": "054b7244973d5ecf36dcada659aa3874f1623fxx",
	"action": "event\/delete",
	"attributes": {
		"event_id": "b80bb752931811eeaeb42ef5b77e53xx"
	},
	"operator": "StaffID1",
	"operator_info": {
		"name": "StaffID1"
	}
}
参数 说明
nonce 用户触发的事件临时码
timestamp 用户触发的事件时间戳
sign 用户触发的事件签名
action 用户触发的事件行为类型
attributes.event_id 删除活动的实体id
attributes.title 活动的标题
attributes.operator 触发者StaffID
attributes.operator_info.name 触发者姓名