feat: add IM org and notification admin
This commit is contained in:
@@ -0,0 +1,39 @@
|
||||
package consts
|
||||
|
||||
import (
|
||||
"hotgo/internal/library/dict"
|
||||
"hotgo/internal/model"
|
||||
)
|
||||
|
||||
func init() {
|
||||
dict.RegisterEnums("ImNotificationSceneOptions", "IM通知场景选项", ImNotificationSceneOptions)
|
||||
dict.RegisterEnums("ImNotificationTemplateStatusOptions", "IM通知模板状态选项", ImNotificationTemplateStatusOptions)
|
||||
}
|
||||
|
||||
const (
|
||||
ImNotificationSceneAccountSecurity = "account_security"
|
||||
ImNotificationSceneFriendRequest = "friend_request"
|
||||
ImNotificationSceneGroupEvent = "group_event"
|
||||
ImNotificationSceneFileEvent = "file_event"
|
||||
ImNotificationSceneMeetingReminder = "meeting_reminder"
|
||||
ImNotificationSceneReportReminder = "report_reminder"
|
||||
ImNotificationSceneWorkOrder = "work_order"
|
||||
|
||||
ImNotificationTemplateEnabled = 1
|
||||
ImNotificationTemplateDisabled = 0
|
||||
)
|
||||
|
||||
var ImNotificationSceneOptions = []*model.Option{
|
||||
dict.GenPrimaryOption(ImNotificationSceneAccountSecurity, "账号安全"),
|
||||
dict.GenInfoOption(ImNotificationSceneFriendRequest, "好友申请"),
|
||||
dict.GenInfoOption(ImNotificationSceneGroupEvent, "群事件"),
|
||||
dict.GenDefaultOption(ImNotificationSceneFileEvent, "文件事件"),
|
||||
dict.GenWarningOption(ImNotificationSceneMeetingReminder, "会议提醒"),
|
||||
dict.GenWarningOption(ImNotificationSceneReportReminder, "日报月报提醒"),
|
||||
dict.GenErrorOption(ImNotificationSceneWorkOrder, "工单处理"),
|
||||
}
|
||||
|
||||
var ImNotificationTemplateStatusOptions = []*model.Option{
|
||||
dict.GenSuccessOption(ImNotificationTemplateEnabled, "启用"),
|
||||
dict.GenWarningOption(ImNotificationTemplateDisabled, "禁用"),
|
||||
}
|
||||
@@ -0,0 +1,38 @@
|
||||
package consts
|
||||
|
||||
import (
|
||||
"hotgo/internal/library/dict"
|
||||
"hotgo/internal/model"
|
||||
)
|
||||
|
||||
func init() {
|
||||
dict.RegisterEnums("ImOrgDepartmentStateOptions", "IM组织部门状态选项", ImOrgDepartmentStateOptions)
|
||||
dict.RegisterEnums("ImOrgEmploymentStateOptions", "IM组织成员在职状态选项", ImOrgEmploymentStateOptions)
|
||||
dict.RegisterEnums("ImOrgContactableOptions", "IM组织成员可联系选项", ImOrgContactableOptions)
|
||||
}
|
||||
|
||||
const (
|
||||
ImOrgDepartmentStateActive = "active"
|
||||
ImOrgDepartmentStateDisabled = "disabled"
|
||||
|
||||
ImOrgEmploymentStateActive = "active"
|
||||
ImOrgEmploymentStateLeft = "left"
|
||||
|
||||
ImOrgContactableYes = 1
|
||||
ImOrgContactableNo = 0
|
||||
)
|
||||
|
||||
var ImOrgDepartmentStateOptions = []*model.Option{
|
||||
dict.GenSuccessOption(ImOrgDepartmentStateActive, "启用"),
|
||||
dict.GenWarningOption(ImOrgDepartmentStateDisabled, "停用"),
|
||||
}
|
||||
|
||||
var ImOrgEmploymentStateOptions = []*model.Option{
|
||||
dict.GenSuccessOption(ImOrgEmploymentStateActive, "在职"),
|
||||
dict.GenDefaultOption(ImOrgEmploymentStateLeft, "离职"),
|
||||
}
|
||||
|
||||
var ImOrgContactableOptions = []*model.Option{
|
||||
dict.GenSuccessOption(ImOrgContactableYes, "可联系"),
|
||||
dict.GenWarningOption(ImOrgContactableNo, "不可联系"),
|
||||
}
|
||||
Reference in New Issue
Block a user