consts

package
v0.0.0-...-57ed434 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 12, 2023 License: AGPL-3.0 Imports: 5 Imported by: 62

Documentation

Index

Constants

View Source
const (
	AppHeaderTokenName = "PM-TOKEN"
	AppHeaderOrgName   = "PM-ORG"
	AppHeaderProName   = "PM-PRO"
	AppHeaderEnvName   = "PM-ENV"
	AppHeaderPlatName  = "PM-PLAT"
	AppHeaderVerName   = "PM-VER"
	AppHeaderLanguage  = "PM-LANG"

	// 任务状态改造后,请求新服务需要带上的 header
	AppHeaderXMdOrgId  = "X-MD-ORGID"
	AppHeaderXMdUserId = "X-MD-USERID"

	HttpHeaderKratosTraceId = "kratos-trace-id"
)

Head Name

View Source
const (
	//AppSourceChannelDingTalk = "ding"
	//AppSourceChannelFeiShu   = "fs"
	//AppSourceChannelWeiXin   = "weixin"
	//AppSourceChannelInvite   = "invite"
	AppSourcePlatformPersonWeixin = "personWeixin"

	AppSourceChannelDingTalkDefaultLang = "zh_CN"

	AppSourcePlatformLarkXYJH2019 = "lark-xyjh2019"

	AppSourceChannelWeb  = "web"
	AppSourceChannelLark = "fs"

	AppUserInfoCacheKey = "cacheUserInfo"
)

来源

View Source
const (
	// 环境变量key
	RunEnvKey = "POL_ENV"
	// 本地
	RunEnvLocal = "local"
	// 开发
	RunEnvDev = "dev"
	// 测试
	RunEnvTest = "test"
	// 预发布
	RunEnvStag = "stag"
	// 生产
	RunEnvProd = "prod"
	// 生产
	RunEnvProdTw = "prodtw"
	// 灰度
	RunEnvGray = "gray"
	// NON
	RunEnvNull = "null"
	// 定制客户特殊的环境变量,用于区分不同的环境
	RunCustomEnvKey = "CUSTOM_ENV_FLAG"
	// 定制客户“中国移动”,特殊的环境变量
	CustomEnvChinaMobile = "ChinaMobile"
)

运行环境

View Source
const (
	REGISTER_HOST      = "REGISTER_HOST"
	REGISTER_PORT      = "REGISTER_PORT"
	REGISTER_NAMESPACE = "REGISTER_NAMESPACE"
)

nacos 配置环境变量

View Source
const (
	//是否被删除
	AppIsDeleteUndefined = 0
	AppIsDeleted         = 1
	AppIsNoDelete        = 2

	// 1启用;2未启用
	AppIsEnable    = 1
	AppIsNotEnable = 2
)
View Source
const (
	AddType = 1
	DelType = 2
)
View Source
const (
	AppCheckStatusWait    = 1
	AppCheckStatusSuccess = 2
	AppCheckStatusFail    = 3
)

审核状态,1待审核,2审核通过,3审核不过

View Source
const (
	PhoneLogin   = 1
	AccountLogin = 2
)
View Source
const (
	AppIsHiding    = 1
	AppIsNotHiding = 2
)

是否隐藏

View Source
const (
	//待联系
	ContactStatusWait = 1
	//已联系
	ContactStatusCompleted = 2
	//联系失败
	ContactStatusFail = 3
)

待联系状态

View Source
const (
	AppUserIsInUse     = 1
	AppUserIsNotInUser = 2
)
View Source
const (
	//是
	AppIsInitStatus = 1
	//否
	AppIsNotInitStatus = 2
)

是否流程初始化状态

View Source
const (
	AppStatusEnable   = 1
	AppStatusDisabled = 2
	AppStatusHidden   = 3
)

是否可用

View Source
const (
	AppShowEnable   = 1
	AppShowDisabled = 2
)

是否展示

View Source
const (
	APPIsDefault    = 1
	AppIsNotDefault = 2
)

是否默认

View Source
const (
	AppIsRemind    = 1
	AppIsNotRemind = 2
)

是否提醒

View Source
const (
	AppIsFilling    = 1
	AppIsNotFilling = 2
)
View Source
const (
	SwitchOff = 1
	SwitchOn  = 2
)
View Source
const (
	// SAAS运行模式
	AppRunmodeSaas = 1
	// 单机部署
	AppRunmodeSingle = 2
	// 私有化部署
	AppRunmodePrivate = 3
	// 私有化单库部署
	AppRunmodePrivateSingleDb = 4
)
View Source
const (
	InitDefaultTeamName     = "默认团队"
	InitDefaultTeamNickname = "默认团队昵称"
)

初始化时的一些常量定义

View Source
const (
	DefaultObjectIdMaxId = int64(1000)
	DefaultObjectIdStep  = 500
)

默认对象id步长

View Source
const (
	CacheModeRedis  = "Redis"
	CacheModeInside = "Inside"
)

系统缓存模式

View Source
const (
	MQModeRocketMQ = "RocketMQ"
	MQModeDB       = "DB"
	MQModeKafka    = "Kafka"
)

系统消息队列模式

View Source
const (
	SendMQStatusSuccess = 1
	SendMQStatusFail    = 2
)

发送消息状态

View Source
const (
	//待处理
	MQStatusWait = 1
	//处理中
	MQStatusHandle = 2
	//处理成功
	MQStatusSuccess = 3
	//处理失败
	MQStatusFail = 4
)

消息处理状态

View Source
const (
	// 由于产品调整,以及短信平台参数的设定,签名值改为了“极星” @千源
	SMSSignNameBeiJiXing = "极星"
	//登录验证码,需要code参数
	SMSTemplateCodeLoginAuthCode = "SMS_461335380"
	//绑定验证码,需要code参数
	SMSTemplateCodeBindAuthCode = "SMS_181500004"
	//解绑验证码,需要code参数
	SMSTemplateCodeUnBindAuthCode = "SMS_461795335"
	//找回密码验证码,需要code参数
	SMSTemplateCodeRetrievePwdAuthCode = "SMS_461880294"
	//注册验证码,需要code参数
	SMSTemplateCodeRegisterAuthCode = "SMS_461835279"
	//重置密码验证码,需要code参数
	SMSTemplateCodeResetPwdAuthCode = "SMS_461795336"
	// 批量发送邀请成员短信模板代号
	SMSTemplateCodeInviteUserByPhones = "SMS_268511125"
)

SMS签名和模板定义

View Source
const (
	//验证码code
	SMSParamsNameCode = "code"
	// 短信模板参数名 orgName
	SMSParamsNameOrgName = "orgName"
	// 短信模板参数名 inviteCode
	SMSParamsNameInviteCode = "inviteCode"
	//验证动作
	SMSParamsNameAction = "action"
	//链接地址
	SMSParamsNameInviteUrl = "inviteUrl"
	//跳转地址
	SMSParamsNameInviteHref = "inviteHref"
)

SMS参数名配置

View Source
const (
	SMSAuthCodeActionLogin       = "登录"
	SMSAuthCodeActionRegister    = "注册"
	SMSAuthCodeActionResetPwd    = "修改密码"
	SMSAuthCodeActionRetrievePwd = "找回密码"
	SMSAuthCodeActionBind        = "绑定账号"
	SMSAuthCodeActionUnBind      = "解绑账号"
)

短信验证Action

View Source
const (
	MailTemplateSubjectAuthCodeLogin       = "欢迎使用极星协作,您正在进行" + SMSAuthCodeActionLogin + ",请验证邮箱"
	MailTemplateSubjectAuthCodeRegister    = "欢迎使用极星协作,您正在进行" + SMSAuthCodeActionRegister + ",请验证邮箱"
	MailTemplateSubjectAuthCodeResetPwd    = "欢迎使用极星协作,您正在进行" + SMSAuthCodeActionResetPwd + ",请验证邮箱"
	MailTemplateSubjectAuthCodeRetrievePwd = "欢迎使用极星协作,您正在进行" + SMSAuthCodeActionRetrievePwd + ",请验证邮箱"
	MailTemplateSubjectAuthCodeBind        = "欢迎使用极星协作,您正在进行" + SMSAuthCodeActionBind + ",请验证邮箱"
	MailTemplateSubjectAuthCodeUnBind      = "欢迎使用极星协作,您正在进行" + SMSAuthCodeActionUnBind + ",请验证邮箱"
	MailTemplateContentAuthCode            = "" /* 228-byte string literal not displayed */
)

邮箱验证码模板

View Source
const (
	MailTemplateSubjectInvite = "欢迎使用LessCode平台"
	MailTemplateContentInvite = "" /* 208-byte string literal not displayed */
)

邮箱邀请模板

View Source
const (
	//未读通知
	NoticeUnReadStatus = 1
	//已读通知
	NoticeReadStatus = 2
)
View Source
const (
	PermissionTypeSys = 1
	PermissionTypeOrg = 2
	PermissionTypePro = 3
)
View Source
const (
	IssuePlanTimeRemindTypePlanEndTime   = 1
	IssuePlanTimeRemindTypePlanStartTime = 2
)

任务计划时间提醒类型

View Source
const (
	TemplateTrue  = 1
	TemplateFalse = 2

	// 模板预览需求-用于模板预览的组织的用户登录的 token
	PreviewTplToken         = "o999u2t3b6b7eaeda0f403998db1dc26be4dd1b"  // 该 token 用于预览模板
	PreviewTplTokenForWrite = "o999u10t344a04f0bd0b47e598c5012a52adfd9c" // 该模板用于创建项目、新建模板
	PreviewTplOrgId         = 999
	PreviewTplUserId        = 2
	PreviewOrWriteTplUserId = 10
)
View Source
const (
	//负责人
	IssueRelationTypeOwner = 1
	//参与人
	IssueRelationTypeParticipant = 2
	//关注人
	IssueRelationTypeFollower = 3
	//关联任务
	IssueRelationTypeIssue = 4
	//资源
	IssueRelationTypeResource = 5
	//收藏项目
	IssueRelationTypeStar = 6
	//前后置任务
	IssueRelationTypeBeforeAfter = 7

	//状态
	IssueRelationTypeStatus = 20
	//飞书日历日程
	IssueRelationTypeCalendar = 21
	//飞书群聊外部id
	IssueRelationTypeChat = 22
	//飞书群聊外部id(主群聊,只用于记录主群聊,不会涉及删除和新增)
	IssueRelationTypeMainChat = 23
	//自定义字段
	IssueRelationTypeCustomField = 24
	//参与部门(目前针对于项目)
	IssueRelationTypeDepartmentParticipant = 25
	//确认人(审批)
	IssueRelationTypeAuditor = 26
	// IssueRelationTypeBelongManyPro 任务属于多项目的关联
	IssueRelationTypeBelongManyPro = 27

	// project chat 中的 chat_type 设置
	ChatTypeMain = 1 // 对应于主群聊,或者创建项目时,自动创建的群聊
	ChatTypeOut  = 2
)

Issue 关联类型

View Source
const (
	// 敏捷项目的对象类型
	ProjectObjectTypeLangCodeIteration = "Project.ObjectType.Iteration"
	ProjectObjectTypeLangCodeBug       = "Project.ObjectType.Bug"
	ProjectObjectTypeLangCodeTestTask  = "Project.ObjectType.TestTask"
	ProjectObjectTypeLangCodeFeature   = "Project.ObjectType.Feature"
	ProjectObjectTypeLangCodeDemand    = "Project.ObjectType.Demand"
	ProjectObjectTypeLangCodeTask      = "Project.ObjectType.Task"

	// 通用项目的对象类型
	ProjectObjectTypeLangCodeCommonTask = "Project.ObjectType.Common.Task"
)

项目对象类型LangCode

View Source
const (
	//普通
	ProjectTypeLangCodeNormalTask = "ProjectType.NormalTask"
	//敏捷
	ProjectTypeLangCodeAgile = "ProjectType.Agile"

	// 过滤内置字段、自定义字段信息的场景,不同场景会有一些特殊操作
	FilterColumnUsingTypeImport = "import"
	FilterColumnUsingTypeExport = "export"
)

项目类型LangCode

View Source
const (
	//通用项目id
	ProjectTypeNormalId = 1
	//敏捷项目id
	ProjectTypeAgileId = 2
	// 新项目类型2022
	ProjectTypeCommon2022V47 = 47
	// 空项目
	ProjectTypeEmpty = 48
)

项目基础类型

View Source
const (
	ProcessLangCodeDefaultTask      = "Process.Issue.DefaultTask"      //默认任务流程
	ProcessLangCodeDefaultAgileTask = "Process.Issue.DefaultAgileTask" //默认敏捷项目任务流程
	ProcessLangCodeDefaultBug       = "Process.Issue.DefaultBug"       //默认缺陷流程
	ProcessLangCodeDefaultTestTask  = "Process.Issue.DefaultTestTask"  //默认测试任务流程
	ProcessLangCodeDefaultProject   = "Process.DefaultProject"         //默认项目流程
	ProcessLangCodeDefaultIteration = "Process.DefaultIteration"       //默认迭代流程
	ProcessLangCodeDefaultFeature   = "Process.Issue.DefaultFeature"   //默认特性流程
	ProcessLangCodeDefaultDemand    = "Process.Issue.DefaultDemand"    //默认需求流程
)

流程langCode

View Source
const (
	//项目流程
	ProcessPrject = 1
	//迭代流程
	ProcessIteration = 2
	//问题流程
	ProcessIssue = 3
)
View Source
const (
	//优先级类型-项目
	PriorityTypeProject = 1
	//优先级类型-需求/任务等优先级
	PriorityTypeIssue = 2
)
View Source
const (
	PriorityIssueCommon = "Priority.Issue.P2"

	// 项目隐私模式状态值 启用1;不启用2
	ProSetPrivacyEnable  = 1
	ProSetPrivacyDisable = 2
)
View Source
const (
	//项目状态
	ProcessStatusCategoryProject = 1
	//迭代状态
	ProcessStatusCategoryIteration = 2
	//任务状态
	ProcessStatusCategoryIssue = 3
)
View Source
const (
	UserTeamRelationTypeLeader = 1
	UserTeamRelationTypeMember = 2
)

user team relation Type

View Source
const (
	DailyReport   = 1
	WeeklyReport  = 2
	MonthlyReport = 3
)
View Source
const (
	//本地
	LocalResource = 1
	//oss
	OssResource = 2
	//钉盘
	DingDiskResource = 3
	//集群
	PrivateResource = 4
	//飞书云文档
	FsResource = 5
)

资源存储方式

View Source
const (
	//http路径
	UrlTypeHttpPath = 1
	//dist路径
	UrlTypeDistPath = 2
)

url类型

View Source
const (
	//公用项目
	PublicProject = 1
	//私有项目
	PrivateProject = 2
)
View Source
const (
	ProjectMemberEffective = 1
	ProjectMemberDisabled  = 2
)
View Source
const (
	ProjectIsFiling     = 1
	ProjectIsNotFiling  = 2
	ProjectIsFilingDesc = "已归档"
)
View Source
const (
	MessageTypeIssueTrends   = 20
	MessageTypeProjectTrends = 21
)

消息类型定义

View Source
const (
	MessageStatusWait      = 1
	MessageStatusDoing     = 2
	MessageStatusCompleted = 3
	MessageStatusFail      = 4
)

消息状态

View Source
const (
	IsSyncOutCalendar    = 1
	IsNotSyncOutCalendar = 2
	// 该值通过二进制的位运算进行计算 128 64 32 16 8 4 2 1 以此类推
	// 4:负责人;8关注人;其他暂时预留。
	IsSyncOutCalendarForOwner    = 4
	IsSyncOutCalendarForFollower = 8
	// 16 同步到订阅日历
	IsSyncOutCalendarForSubCalendar      = 16
	IsSyncOutCalendarForOwnerAndFollower = 12
	// 该值用于位运算的参数之一。业务上不做使用。
	IsSyncOutCalendarForAllPosition = 255
)

是否导出飞书日历

View Source
const (
	Male   = 1
	Female = 2
)

性别 1:男性 2:女性

View Source
const (
	ContactAddressTypeMobile = 1
	ContactAddressTypeEmail  = 2
)

联系地址类型

View Source
const (
	AuthCodeTypeLogin              = 1
	AuthCodeTypeRegister           = 2
	AuthCodeTypeResetPwd           = 3
	AuthCodeTypeRetrievePwd        = 4
	AuthCodeTypeBind               = 5
	AuthCodeTypeUnBind             = 6
	AuthCodeTypeInviteUserByPhones = 7 // 通过手机号批量邀请成员加入团队
)

验证码验证类型1: 登录验证码,2:注册验证码,3:修改密码验证码,4:找回密码验证码,5:绑定,6,解绑

View Source
const (
	//短信验证码登录
	LoginTypeSMSCode = 1
	//账号密码登录
	LoginTypePwd = 2
	//邮箱登录
	LoginTypeMail = 3
)

登录类型

View Source
const (
	//短信注册
	RegisterTypeSMSCode = 1
	//账号密码注册
	RegisterTypePwd = 2
	//邮箱注册
	RegisterTypeMail = 3
)

注册类型

View Source
const (
	WeiXinScanCodeType     = 1
	WeiXinPlatformCodeType = 2
)
View Source
const (
	//项目
	MQTTChannelTypeProject = 1
	//应用
	MQTTChannelTypeApp = 4
	//组织
	MQTTChannelTypeOrg = 2
	//个人
	MQTTChannelTypeUser = 3
)

mqtt channelType

View Source
const (
	MQTTChannelPrefix  = "MQTT/"
	MQTTChannelRoot    = MQTTChannelPrefix + "#/"
	MQTTChannelOrgRoot = MQTTChannelPrefix + "org/{{.OrgId}}/#/"
	MQTTChannelOrg     = MQTTChannelPrefix + "org/{{.OrgId}}/channel/"
	MQTTChannelProject = MQTTChannelPrefix + "org/{{.OrgId}}/project/{{.ProjectId}}/channel/"
	MQTTChannelApp     = MQTTChannelPrefix + "org/{{.OrgId}}/app/{{.AppId}}/channel/"
	MQTTChannelTable   = MQTTChannelPrefix + "org/{{.OrgId}}/app/{{.AppId}}/table/{{.TableId}}/channel/"
	MQTTChannelUser    = MQTTChannelPrefix + "org/{{.OrgId}}/user/{{.UserId}}/channel/"

	MQTTChannelKeyOrg     = "OrgId"
	MQTTChannelKeyProject = "ProjectId"
	MQTTChannelKeyTable   = "TableId"
	MQTTChannelKeyApp     = "AppId"
	MQTTChannelKeyUser    = "UserId"
)

mqtt channel

View Source
const (
	// 提醒
	MQTTNoticeTypeRemind = 1
	// 数据刷新
	MQTTNoticeTypeDataRefresh = 2
)

mqtt 通知类型

View Source
const (
	//新增
	MQTTDataRefreshActionAdd = "ADD"
	//删除
	MQTTDataRefreshActionDel = "DEL"
	//更新
	MQTTDataRefreshActionModify = "MODIFY"
	//更新任务sort
	MQTTDataRefreshActionModifySort = "MODIFYSORT"
	//移动
	MQTTDataRefreshActionMove = "MOVE"
	//归档
	MQTTDataRefreshActionArchive = "Archive"
	//取消归档
	MQTTDataRefreshActionCancelArchive = "CancelArchive"
)

mqtt 数据刷新通知类型

View Source
const (
	//项目
	MQTTDataRefreshTypePro = "PRO"
	//任务
	MQTTDataRefreshTypeIssue = "ISSUE"
	//标签
	MQTTDataRefreshTypeTag = "TAG"
	//人员
	MQTTDataRefreshTypeMember = "MEMBER"
)

mqtt 数据刷新对象类型

View Source
const (
	PayLevelStandard      = 1 // 标准版
	PayLevelEnterprise    = 2 // 企业版
	PayLevelFlagship      = 3 // 旗舰版
	PayLevelPrivateDeploy = 4 // 私有化部署

	PayLevelDouble11Activity = 33 // 双11大促 活动

	PayLevelDingFreeTrial = 33 // 免费试用 (在试用时间期限内 相当于旗舰版)
)

支付等级

View Source
const (
	ActivityFlag = "activity20221111"

	ActivityFinished    = 2
	ActivityNotFinished = 1
)
View Source
const (
	IsPlatformAdmin  = 1
	NotPlatformAdmin = 2
)
View Source
const (
	// 单文件大小限制,默认的 1G
	MaxFileSizeStandard = 1073741824

	// 任务评论上传附件大小限制
	MaxIssueAttachmentSize = 10 * 1024 * 1024
)

上传文件大小限制

View Source
const (
	RecycleTypeIssue = 1 //任务
	//RecycleTypeTag        = 2 //标签
	RecycleTypeFolder     = 3 //文件夹
	RecycleTypeResource   = 4 //文件
	RecycleTypeAttachment = 5 //附件
)

回收站对象类型

View Source
const (
	//任务层级限制
	IssueLevel = 9

	// MaxRawSupportForImportIssue 导入任务的最大任务数
	MaxRawSupportForImportIssue = 5000
)
View Source
const (
	//任务附件引用和上传区分(用于动态)
	IssueAttachmentReferRelationCode = "refer"
	// 任务属于多个项目的关联关系 code
	IssueRelationBelongManyProCode = "IssueRelationBelongManyPro"
)
View Source
const (
	TriggerByNormal        = "normal"
	TriggerByCopy          = "copy"
	TriggerByImport        = "import"        // 导入
	TriggerByApplyTemplate = "applyTemplate" // 应用模板
	TriggerByAutomation    = "automation"    // 自动化(工作流)
	TriggerByAutoSchedule  = "autoSchedule"  // 自动排期
)
View Source
const (
	TabularViewName    = "表格视图"
	OwnerViewName      = "我负责的"
	AllOverDueSoonView = "所有即将逾期"
	AllOverDueView     = "所有已逾期"
	AllUnFinishedView  = "所有未完成"
	AllIssueView       = "所有任务"
	MyOverDueView      = "我的已逾期"
	MyDailyDueOfToday  = "我的今日截止"
	MyOverDueSoonView  = "我的即将逾期"
	MyPending          = "我的待完成"

	OverDueSoonViewName = "即将逾期"
)
View Source
const (
	TabularViewType = 1 // 表格视图
	KanbanViewType  = 2 // 看板视图
	GanttViewType   = 6 // 甘特视图
)

表格视图type

View Source
const (
	//不需要确认的初始状态
	AuditStatusNoNeed = -1
	//未查看(任务里面需要审批的默认为此状态)
	AuditStatusNotView = 1
	//已查看未审核
	AuditStatusView = 2
	//审批通过
	AuditStatusPass = 3
	//审批驳回
	AuditStatusReject = 4
)
View Source
const (
	WaitConfirmStatusName      = "待确认"
	WaitConfirmStatusEnName    = "To confirm" // 英文名
	CompleteStatusEnName       = "Completed"
	WaitConfirmStatusFontStyle = "#FF8040"
	WaitConfirmStatusBgStyle   = "#FCE7DC"

	// excel 导入成员错误信息
	ImportUserErrOfPhoneFormatErr       = "手机号码格式错误"
	ImportUserErrOfPhoneRegionFormatErr = "国家代码格式错误"
	ImportUserErrOfPhoneSendLimitErr    = "该手机号发送邀请过于频繁,请稍后再试。"
	ImportUserErrOfPhoneMultipleErr     = "手机号码重复(在提交的表格中重复)"
	ImportUserErrOfPhoneExistErr        = "当前团队内已存在相同的手机号码,请更换后重试"
	ImportUserErrOfEndTimeLessErr       = "截止时间必须大于开始时间!"
	ImportUserErrOfStartTimeStyleErr    = "开始/截止时间格式不正确!"

	// 导入任务时的一些提示信息
	ImportIssueErrOfEmail     = "邮箱格式不正确"
	ImportIssueErrOfLink      = "链接格式不正确"
	ImportIssueErrOfPhone     = "手机号格式不正确"
	ImportIssueErrOfIssueType = "任务类型不正确"
	ImportIssueErrOfDateTime  = "日期/时间格式不正确"
)
View Source
const (
	RemindPopUp = "remindPopUp"

	NeedRemindPopUp    = 1 // 个人中心需要弹窗弹出
	NotNeedRemindPopUp = 2 // 个人中心不需要弹窗弹出
)
View Source
const (
	// 飞书云文档的关键词就是 drive
	FsScopeDriveRead = "drive:drive:readonly"

	// 机器人个人指令名
	BotPrivateInsNameOfSetting = "设置"

	// 异步任务,已处理的任务 redis key
	AsyncTaskHashPartKeyOfProcessed = "processed" // 处理成功的数量
	AsyncTaskHashPartKeyOfFailed    = "failed"    // 处理失败的数量
	AsyncTaskHashPartKeyOfTotal     = "total"     // 记录总数量
	AsyncTaskHashPartKeyOfStartTime = "startTime" // 异步任务开始时间戳
	AsyncTaskHashPartKeyOfCover     = "cover"     // 处理应用模板时,返回给前端的模板封面图
	AsyncTaskHashPartKeyOfErrCode   = "errCode"   // 异步任务异常时,保存异常 code
	AsyncTaskHashPartKeyOfCardSend  = "cardSend"  // 异步任务完成后,是否已发送卡片通知
	AsyncTaskHashPartKeyOfTableIds  = "tableIds"  // 异步任务相关的 tableId。仅仅用于配合前端(lianBin):需要一个 tableIds

	// 任务导入/应用模板等异步任务处理,设定一个进度步进时间阈值,超过该时间,视为失败
	AsyncTaskProcessTimeout = 60 * 5
)

飞书权限标识

View Source
const (
	WeiXinStandardId   = "sp28f962a931196966"
	WeiXinEnterpriseId = "sp27595b32ebd809b2"
	WeiXinFlagshipId   = "spb2f970fbc6267e95"

	TestWeiXinStandardId   = "spfc96b11066ab0fe3"
	TestWeiXinEnterpriseId = "sp0daf1130d48ea70a"
	TestWeiXinFlagshipId   = "spdfd120ffb5c71e07"
)
View Source
const (
	FsStandardId   = "price_a15167c3baae1013"
	FsEnterpriseId = "price_a15167c3baaf5013"
	FsFlagshipId   = "price_a387472ac97b900b"
)
View Source
const (
	DingFreeCode       = "DT_GOODS_881666335729668_1808020"
	DingTrailCode      = "DT_GOODS_881666335729668_1808016"
	DingEnterpriseCode = "DT_GOODS_881666335729668_1808018"
	DingFlagshipCode   = "DT_GOODS_881666335729668_1808015"
)
View Source
const (
	SetFsPayRange    = 1 // 飞书设置了付费范围
	NotSetFsPayRange = 2 // 飞书没有设置付费范围
)
View Source
const (
	AppsvcApplicationName      = "appsvc:"
	IdsvcApplicationName       = "idsvc:"
	MsgsvcApplicationName      = "msgsvc:"
	CallsvcApplicationName     = "callsvc:"
	OrgsvcApplicationName      = "orgsvc:"
	ProcesssvcApplicationName  = "processsvc:"
	ProjectsvcApplicationName  = "projectsvc:"
	ResourcesvcApplicationName = "resourcesvc:"
	RolesvcApplicationName     = "rolesvc:"
	RrendssvcApplicationName   = "trendssvc:"
	SchedulesvcApplicationName = "scheduletsvc:"
	CommonsvcApplicationName   = "commonsvc"
	OrderApplicationName       = "ordersvc:"
)

服务名

View Source
const (
	//用户Token失效时间: 15天
	CacheUserTokenExpire = 60 * 60 * 24 * 15
	//通用失效时间: 3小时
	CacheBaseExpire = int64(60 * 60 * 3)
	//用户信息缓存: 1小时
	CacheBaseUserInfoExpire = int64(60 * 60 * 1)
	CacheExpire1Day         = int64(60 * 60 * 24)
)

失效时间

View Source
const (
	CacheKeyOrgIdConstName         = "orgId"
	CacheKeyUserIdConstName        = "userId"
	CacheKeyAppIdConstName         = "appId"
	CacheKeyOutOrgIdConstName      = "outOrgId"
	CacheKeyOutUserIdConstName     = "outUserId"
	CacheKeyProjectIdConstName     = "projectId"
	CacheKeyIssueIdConstName       = "issueId"
	CacheKeyObjectCodeConstName    = "objectCode"
	CacheKeyProcessIdConstName     = "processId"
	CacheKeyRoleIdConstName        = "roleId"
	CacheKeySourceChannelConstName = "sourceChannel"
	CacheKeyYearConstName          = "year"
	CacheKeyMonthConstName         = "month"
	CacheKeyDayConstName           = "day"
	CacheKeyPhoneConstName         = "phone"
	CacheKeyAuthTypeConstName      = "authType"
	CacheKeyAddressTypeConstName   = "addressType"
	CacheKeyLoginNameConstName     = "loginName"
	CacheKeyRoleGroupConstName     = "roleGroup"
	CacheKeyDepartmentIdConstName  = "departmentId"
	CacheKeyAsyncTaskIdConstName   = "asyncTaskId"
	CacheKeyJsapiTicketConfigType  = "configType"
)
View Source
const (

	//fs用户refresh_token和user_access_token
	CacheFsUserAccessToken = CacheKeyPrefix + OrgsvcApplicationName + CacheKeyOfOrg + CacheKeyOfUser + "fstoken"

	//mqtt root key
	CacheMQTTRootKey = CacheKeyPrefix + CacheKeyOfSys + "mqtt:root_key"

	//灰度企业名单
	// 异步任务进度信息
	CacheKeyOfAsyncTaskInfo = CacheKeyPrefix + OrgsvcApplicationName + CacheKeyOfOrg + CacheKeyOfAsyncTask + CacheKeyOfAsyncTaskId

	// 极星付费范围
	CachePayRangeInfo = CacheKeyPrefix + CacheKeyOfSys + "pay_range_info"
)

系统缓存

View Source
const (
	// 1催办负责人;2催办审批
	UrgeOwner    = 1
	UrgeAuditors = 2

	DefaultTableName = "任务"

	// 群聊机器人推送配置,该项代表“任务更新”选项勾选后,勾选任务的所有列
	GroupChatAllIssueColumnFlag = "__allIssueColumnSelect"

	// 创建任务的来源,目前有用户界面创建、任务导入、任务复制等几种来源
	CreateIssueSourceNormal = "normalCreate" // 普通的用户界面创建来源
	CreateIssueSourceImport = "import"       // 导入
	CreateIssueSourceCopy   = "copy"         // 复制

	// 飞书卡片任务更新内容描述,一行不可超过 50 个字符
	GrouChatIssueChangeDescLimitPerLine = 50
	// 卡片中评论文本内容限制 150 **字节**
	GroupChatIssueCommentLimit = 150
	// 卡片中评论文本内容限制 50 **字符**
	GroupChatIssueCommentCutLimit = 50

	// 列名/别名限制6个字符
	ColumnAliasLimit = 6
	// 截断后的展示占位
	CardIssueColumnNameOverflow     = "…"      // 列名超出限制后,截断占位补全。
	CardIssueChangeDescTextOverflow = "......" // cell 值的截断占位补全。在飞书卡片中,两个点占一个中文字符
	// 列明后的符号,冒号或者不需要冒号
	CardSymbolAfterColumnName = ""
	// 更新 cell 时,如果有多个 target,拼接连接符
	CardTargetNameGlue = "、"

	CardIssueChangeDescForNotSupportShow = "*资源不支持显示*"

	FsCardNotUnderStand = "我没有理解你的意思,你可以通过以下方式与项目交互:\n"
	FsCardBindMultiPro  = "已将2个项目关联到本群聊\n" +
		" 您关联的所有项目都将推送动态至本群聊。\n" +
		"您还可以发送 @极星协作 设置 ,重新进行推送设置。"

	FsCardNoBindPro = "Hi~您好,我是极星协作的机器人。\n" +
		"我可以为您推送关注的项目动态。快来对我设置吧^ ^ ~" + ""

	FsCardHelpOfBind0ProForGroupChat = "项目相关动态会同步到这个群里,点击下面的按钮调整动态通知范围:"

	FsCardProjectSettings = "项目相关的动态会同步到这个群里,点击下面的按钮调整动态通知范围:"

	FsCardBotNotificationText   = "点击下面的按钮调整通知范围:"
	FsCardBotNotificationButton = "通知范围设置"

	FsCardUpgradeNoticeTitle   = "你的同事申请升级/续费极星协作"
	FsCardUpgradeNoticeContent = "" /* 143-byte string literal not displayed */

	FsCardReplyIssueChatIns = "本群为特定任务群聊,暂不支持快捷操作。你是否想要查看当前记录的详情?"

	FsCardSubscribeNotice = "" /* 127-byte string literal not displayed */

	FsCardHelpInfoForInstructionHelp = "@极星协作 项目任务\n" +
		"@极星协作 项目进展\n" +
		"@极星协作 设置\n" +
		"也可以 @负责人姓名 来查询其负责任务情况或指派任务给该负责人\n" +
		"@极星协作 @负责人姓名\n" +
		"@极星协作 @负责人姓名 任务标题"
	// 飞书卡片 - 个人机器人创建任务时- 用户创建任务是达到上限文案提示
	FsCardTextIssueMaxLimit = "" /* 145-byte string literal not displayed */

	// 工时卡片中工时时间展示的时间 format eg: 2006-01-02 15:04:05
	FsCardWorkHourTimeRangeFormat         = "01月02号"
	FsCardWorkHourTimeRangeFormatWithYear = "2006年01月02号"
	// 协作人的标识
	UserTypeOfCollaborate = "collaborate"
	// 个人推送开关配置,开关标识
	PersonalPushConfigForMyDailyReport     = "myDailyReport"     // 个人日报
	PersonalPushConfigForProDailyReport    = "proDailyReport"    // 项目日报
	PersonalPushConfigForOwnerRange        = "ownerRange"        // 我负责的
	PersonalPushConfigForCollaborateRange  = "collaborateRange"  // 我协作的
	PersonalPushConfigForIssueUpdate       = "issueUpdate"       // 任务被更新
	PersonalPushConfigForIssueBeComment    = "issueBeComment"    // 任务被评论
	PersonalPushConfigForRelateIssueTrends = "relateIssueTrends" // 关联任务动态
	PersonalPushConfigForRemindMessage     = "remindMessage"     // 任务提醒,被添加到记录

	CardDefaultOwnerNameForUpdateIssue        = "无" // 更新记录如果有 无
	CardDefaultIssueParentTitleForUpdateIssue = "无"
	CardDefaultIssueProjectName               = "未放入项目"
	CardDefaultRelationIssueTitle             = "未命名记录"

	// 卡片推送订阅开关值
	CardSubscribeSwitchOn  = 1
	CardSubscribeSwitchOff = 2

	CardButtonTextForViewInsideApp  = "应用内查看"
	CardButtonTextForViewDetail     = "查看详情"
	CardButtonTextForPersonalReport = "去处理"

	// 飞书卡片左对齐的字符数
	//CardAlineCharacter = "%-15s\t%s"
	// 卡片要推送的字段名
	CardElementTitle        = "标题"
	CardElementCode         = "编号"
	CardElementProject      = "项目"
	CardElementProjectTable = "项目/表"
	CardElementAppTable     = "应用/表"
	CardElementParent       = "父记录"
	CardElementOwner        = "负责人"
	CardElementOperator     = "操作人"
	CardElementChatTopic    = "讨论主题"
	//CardElementUrge         = "催办:"
	CardElementReply                 = "你的回复:"
	CardElementUpdateInfo            = "更新详情:"
	CardElementComment               = "评论:"
	CardElementEvaluate              = "评价:"
	CardElementAttachment            = "附件:"
	CardElementWithoutPermissionTips = "*注:暂无部分字段的编辑权限*"
	CardTitlePlanEndRemind           = "⏰ 即将到达截止时间"
	CardTitlePlanStartRemind         = "⏰ 任务即将开始"
	CardTitleAuditAlready            = "审批已处理,无需再操作"
	CardTitleUrgeIssue               = "👨🏻‍💻%s催办了记录"
	CardUrgePeople                   = "%s催办:"
	CardDoubleQuotationMarks         = "“%s”"
	CardReplyUrgeTitle               = "%s回复了催办"
	CardReplyBeUrged                 = "%s回复:"
	CardAuditorTitle                 = "✅ %s 提交了审批"
	CardTodoAuditTitle               = "✅ %s 请您审批"
	CardTodoFillInTitle              = "📝 %s 请您填写"
	CardIssueAddMember               = "%s 将你添加为 %s"
	CardPlanEndTime                  = "计划截止时间"
	CardWorkHourAddDesc              = "添加了%s:%s %s小时 %s"
	CardWorkHourDelDesc              = "删除了%s:~~%s %s小时 %s~~"
	CardWorkHourModify               = "修改了%s:~~%s~~ **→** %s"
	CardDocAndImageAddDesc           = "添加了 “%s”"
	CardDocAndImageDelDesc           = "删除了 ~~“%s”~~"
	CardRelatingAddDesc              = "添加了:%s"
	CardRelatingDelDesc              = "删除了:~~%s~~"
	CardBaRelatingLinkToAddDesc      = "添加了(前置):%s"
	CardBaRelatingLinkToDelDesc      = "删除了(前置):~~%s~~"
	CardBaRelatingLinkFromAddDesc    = "添加了(后置):%s"
	CardBaRelatingLinkFromDelDesc    = "删除了(后置):~~%s~~"
	CardCommonChangeDesc             = "~~%s~~ → %s"
	CardCompleteIssue                = "完成记录"
	CardShare                        = " 分享了记录"
	CardUnSubscribe                  = "点击退订"
	CardReplySelectFirst             = "现在忙,晚点处理"
	CardAuditPass                    = "通过"
	CardAuditReject                  = "驳回"
	CardReplyUrgeSelf                = "你回复了催办"
	CardModifyDeadline               = "修改截止时间"
	CardCompleteTask                 = "完成任务"
	CardIssueCreateErr               = "任务创建失败"
	CardProTrendsSettings            = "项目动态设置"
	CardCronTrigger                  = "工作流【%s】"
	CardDataEvent                    = "%s 触发工作流【%s】"

	// 飞书卡片标题颜色
	// https://open.feishu.cn/document/ukTMukTMukTM/ukTNwUjL5UDM14SO1ATN
	FsCardTitleColorBlue   = "blue"
	FsCardTitleColorOrange = "orange"

	// 飞书按钮颜色
	FsCardButtonColorDefault = "default"
	FsCardButtonColorPrimary = "primary"
	FsCardButtonColorDanger  = "danger"

	// 企微卡片标题颜色
	WxCardTitleColorInfo    = "info"
	WxCardTitleColorComment = "comment"
	WxCardTitleColorWarning = "warning"

	FsCardButtonTextForViewInsideApp = "应用内查看"
	FsCardButtonTextForViewDetail    = "查看详情"
	FsCardButtonTextForGotoSetting   = "前往配置"

	CardTablePro = "%s/%s"

	// 制表符
	FsCard1Tab           = "\t"
	FsCard2Tab           = "\t\t"
	FsCard3Tab           = "\t\t\t"
	FsCard4Tab           = "\t\t\t\t"
	FsCardCommentPattern = "<at id=\\w+></at>"

	MarkdownBr         = "\n"
	MarkdownBold       = "**%s**"
	MarkdownLink       = "[%s](%s)"
	MarkdownTitle      = "### %s"
	MarkdownColorTitle = "### <font color=\"%s\">%s</font>"
	MarkdownColor      = "<font color=\"%s\">%s</font>"
	MarkDownDel        = "~~"

	CardPaddingChBlank = " "
	CardPaddingEnBlank = " "
	CardKeyChLength    = 7
	CardKeyEnLength    = 3

	CardLevelInfo    = 0
	CardLevelWarning = 1

	// 飞书卡片按钮,链接打开方式
	// 值详情参考 https://open.feishu.cn/document/uAjLw4CM/uYjL24iN/applink-protocol/supported-protocol/open-a-gadget
	FsCardAppLinkOpenTypeSideBar   = "sidebar-semi" // 侧边栏打开
	FsCardAppLinkOpenTypeAppCenter = "appCenter"    // 工作台打开
)
View Source
const (
	DailyProjectReportTitle  = "项目日报"
	DailyFinishCountTitle    = "今日完成"
	DailyRemainingCountTitle = "剩余未完成"

	DailyPersonalIssueReportTitle = "个人日报"
	DailyDueOfTodayTitle          = "我的今日截止"
	BeAboutToOverdueTitle         = "我的即将逾期"
	DailyOverdueCountTitle        = "我的已逾期"
	PendingTitle                  = "我的待完成"
)
View Source
const (
	//类型(1文本类型2单选框3多选框4日期选框5人员选择6是非选择7数字框)
	CustomTypeText        = 1
	CustomTypeRadio       = 2
	CustomTypeCheckBox    = 3
	CustomTypeDate        = 4
	CustomTypePersonnel   = 5
	CustomTypeTrueOrFalse = 6
	CustomTypeNumber      = 7

	// 自定义字段是非选择值枚举
	CustomTypeBoolTrueVal  = 1
	CustomTypeBoolFalseVal = 2
)
View Source
const (
	ProjectViewTypeBoard = 1 //看板
	ProjectViewTypeList  = 2 //列表
	ProjectViewTypeTable = 3 //表格
)
View Source
const (
	ProjectFieldTitle           = "title"           //任务名称
	ProjectFieldStatus          = "status"          //任务状态
	ProjectFieldOwner           = "owner"           //负责人
	ProjectFieldCreateTime      = "createTime"      //创建时间
	ProjectFieldPriority        = "priority"        //优先级
	ProjectFieldPlanStartTime   = "planStartTime"   //开始时间
	ProjectFieldPlanEndTime     = "planEndTime"     //截止时间
	ProjectFieldTag             = "tag"             //标签
	ProjectFieldPlanHour        = "planHour"        //计划工时
	ProjectFieldActualHour      = "actualHour"      //实际工时
	ProjectFieldRelatedIssueNum = "relatedIssueNum" //关联任务数
	ProjectFieldCommentNum      = "commentNum"      //评论数
)

项目默认定义的展示字段

View Source
const (
	CustomFieldScopeOrg = 1
	CustomFieldScopePro = 2
	CustomFieldScopeSys = 3
)
View Source
const (
	TableType = "schema"

	ConditionEqual   = "equal"
	ConditionUnEqual = "un_equal"
	ConditionIn      = "in"
	ConditionLike    = "like"
	ConditionAnd     = "and"

	DeleteFlagDel    = 1
	DeleteFlagNotDel = 2

	// Set
	SetTypeNormal = 1
	SetTypeJson   = 2

	SetActionSet              = 1
	SetActionJsonArrayAddItem = 2
	SetActionJsonArrayDelItem = 3
	SetActionJsonMapSet       = 4
)
View Source
const (
	DataSource = 2 // pg使用的id
	DataBase   = 1 // pg使用的id
)
View Source
const (
	DingOrderBy           = "BUY"           // 新购
	DingOrderRenew        = "RENEW"         // 续费
	DingOrderUpgrade      = "UPGRADE"       // 升级
	DingOrderRenewUpgrade = "RENEW_UPGRADE" // 续费升配
	DingOrderRenewDegrade = "RENEW_DEGRADE" // 续费降配

	DingOrderTrail = 15 // 免费试用15天旗舰版功能

	// 针对试用规格
	DingOrderChargeTryout = "TRYOUT" // 试用开通
	DingOrderChargeFree   = "FREE"   // 免费开通

)

钉钉订单类型

View Source
const (
	Mysql_TransInsert_error_printf = "mysql.TransInsert(): %q\n"

	Tx_Commit_error_printf = "tx.Commit(): %q\n"

	Assembly_CreateIssueTrends_eorror_printf = "AssemblyCreateIssueTrends err %v"

	Assembly_UpdateIssueTrends_eorror_printf = "AssemblyUpdateIssueTrends err %v"

	Mysql_TransUpdate_error_printf = "mysql.TransUpdate(): %q\n"

	MySQL_DEADLOCK_ERROR = "Error 1213: Deadlock found when trying to get lock; try restarting transaction"
)
View Source
const (
	FsCardValueAppId                  = "appId"
	FsCardValueIssueId                = "issueId"
	FsCardValueTableId                = "tableId" // 任务所在的表id
	FsCardValueProjectId              = "projectId"
	FsCardValueOrgId                  = "orgId"
	FsCardValueUserId                 = "userId"
	FsCardValueCardType               = "cardType"
	FsCardValueStatusType             = "statusType"
	FsCardValueAction                 = "action"
	FsCardValueUrgeIssueBeUrgedUserId = "fsCardValueUrgeIssueBeUrgedUserId" // 任务催办:被催者id
	FsCardValueUrgeIssueUrgeText      = "fsCardValueUrgeIssueUrgeText"
	FsCardValueIsGroupChat            = "fsCardValueIsGroupChat"         // 是否是群聊
	FsCardValueGroupChatId            = "fsCardValueGroupChatId"         // 群聊的 out id
	FsCardValueAuditIssueResult       = "fsCardValueAuditIssueResult"    // 通用项目的任务审批,3审批通过;4驳回
	FsCardValueAuditIssueStarterId    = "fsCardValueAuditIssueStarterId" // 任务审批的发起人 id
	FsCardValueCardTitle              = "cardTitle"
	FsCardDatePickerInit              = "initialDatetime" // datePicker组件的初始值key
)

卡片推送自定义字段

View Source
const (
	FsCardTypeIssueRemind     = "IssueRemind"          // 即将到达截止时间
	FsCardTypeIssueUrge       = "FsCardTypeIssueUrge"  // 任务催办卡片
	FsCardTypeIssueAudit      = "FsCardTypeIssueAudit" // 任务审核卡片
	FsCardTypeNoticeSubscribe = "NoticeSubscribe"      //通知订阅
	FsCardTypeIssueCreate     = "FsCardIssueCreate"    // 通过机器人指令创建记录
	FsCardTypeDealTime        = "FsCardTypeDealTime"   // 飞书卡片交互的时候选择时间
)

卡片类型

View Source
const (
	FsCardActionUpdatePlanEndTime   = "FsCardActionUpdatePlanEndTime"
	FsCardActionUpdatePlanStartTime = "FsCardActionUpdatePlanStartTime"
	FsCardActionUpdateIssueStatus   = "FsCardActionUpdateIssueStatus"
	FsCardUnsubscribePersonalReport = "FsCardActionUnsubscribePersonalReport" //退订个人日报
	FsCardUnsubscribeProjectReport  = "FsCardActionUnsubscribeProjectReport"  //退订项目日报
	FsCardUnsubscribeIssueRemind    = "FsCardActionUnsubscribeIssueRemind"    //退订任务提醒
	FsCardUnsubscribeMyCollaborate  = "FsCardActionUnsubscribeMyCollaborate"  //退订我负责的
	FsCardUnsubscribeMyOwn          = "FsCardActionUnsubscribeMyOwn"          //退订我协作的
)

卡片动作

View Source
const (
	FsOrderBuy     = "buy"
	FsOrderUpgrade = "upgrade"
	FsOrderRenew   = "renew"
)

飞书订单类型

View Source
const (
	FsPerSeatPerYear  = "per_seat_per_year"
	FsPerSeatPerMonth = "per_seat_per_month"
	FsTrial           = "trial"
	FsActiveDay       = "active_day"
	FsActiveEndDate   = "active_end_date"
	FsPermanent       = "permanent"

	// 飞书订单试用天数
	FsOrderTrailDays = 15
)

飞书价格方案类型

View Source
const (
	ScopeNameContactAccessAsApp   = "contact:contact:access_as_app"   //以应用身份访问通讯录
	ScopeNameContactReadOnly      = "contact:contact:readonly"        //以应用身份访问通讯录(旧版)
	ScopeNameContactReadOnlyAsApp = "contact:contact:readonly_as_app" //以应用身份访问通讯录,2021-11-22
	ScopeNameCalendarCalendar     = "calendar:calendar"               //更新日历及日程信息v4
	ScopeNameCalendarReadOnly     = "calendar:calendar:readonly"      //获取日历、日程及忙闲信息v4
	ScopeNameCalendarAccess       = "calendar:calendar:access"        //日历相关权限v3
	ScopeNameDocOld               = "docs:docs:operate_as_user"       //老版云文档(操作)
	ScopeNameDocNew               = "drive:drive:readonly"            //新版云文档(查看)
	ScopeNameDocRead              = "drive:drive.search:readonly"     //云文档查看
)
View Source
const (
	FileTypeOthers = 0
	FileTypeDoc    = 1
	FileTypePhoto  = 2
	FileTypeVideo  = 3
	FileTypeMusic  = 4
)

资源类型

View Source
const (
	HttpMethodGet    = "GET"
	HttpMethodPost   = "POST"
	HttpMethodPut    = "PUT"
	HttpMethodDelete = "DELETE"
)
View Source
const (
	LcJsonColumn = "data"

	TempFieldChildren      = "children"
	TempFieldChildrenCount = "childrenCount"
	TempFieldIssueId       = "_issueId"
	TempFieldCode          = "_code"
	TempFieldTodoResult    = "todoResult"

	BasicFieldId                  = "id"
	BasicFieldDataId              = "dataId"
	BasicFieldIssueId             = "issueId"
	BasicFieldTitle               = "title"
	BasicFieldOrgId               = "orgId"
	BasicFieldAppId               = "appId"
	BasicFieldProjectId           = "projectId"
	BasicFieldTableId             = "tableId"
	BasicFieldIterationId         = "iterationId"
	BasicFieldParentId            = "parentId"
	BasicFieldPath                = "path"
	BasicFieldCreator             = "creator"
	BasicFieldCreateTime          = "createTime"
	BasicFieldUpdator             = "updator"
	BasicFieldUpdateTime          = "updateTime"
	BasicFieldMoveTime            = "moveTime"
	BasicFieldDelFlag             = "delFlag"
	BasicFieldRecycleFlag         = "recycleFlag"
	BasicFieldCustomField         = "customField"
	BasicFieldCode                = "code"
	BasicFieldOrder               = "order"
	BasicFieldProjectObjectTypeId = "projectObjectTypeId"
	BasicFieldIssueStatusType     = "issueStatusType" // 任务状态分类:1未开始;2进行中;3已完成
	BasicFieldIssueStatus         = "issueStatus"
	BasicFieldStatus              = "status"
	BasicFieldAuditStatus         = "auditStatus"
	BasicFieldAuditStatusDetail   = "auditStatusDetail"
	BasicFieldPlanStartTime       = "planStartTime"
	BasicFieldPlanEndTime         = "planEndTime"
	BasicFieldEndTime             = "endTime"
	BasicFieldOwnerId             = "ownerId"
	BasicFieldFollowerIds         = "followerIds"
	BasicFieldAuditorIds          = "auditorIds"
	BasicFieldRemark              = "remark"
	BasicFieldRemarkDetail        = "remarkDetail"
	BasicFieldOwnerChangeTime     = "ownerChangeTime"
	BasicFieldTag                 = "_field_tag"
	BasicFieldPriority            = "_field_priority"
	BasicFieldDemandType          = "_field_demand_type"
	BasicFieldDemandSource        = "_field_demand_source"
	BasicFieldBugProperty         = "_field_bug_property"
	BasicFieldBugType             = "_field_bug_type"
	BasicFieldRelating            = "relating"
	BasicFieldBaRelating          = "baRelating"
	BasicFieldRelatingLinkTo      = "linkTo"
	BasicFieldRelatingLinkFrom    = "linkFrom"
	BasicFieldDocument            = "document"
	BasicFieldWorkHour            = "workHour"
	BasicFieldCollaborators       = "collaborators"
	RelateTableId                 = "relateTableId"
	BasicFieldColla

	BasicFieldAuditStarter = "auditStarter" // 审批发起人
	BasicFieldOutChatId    = "outChatId"    // 任务讨论群id

	//一些其他辅助的任务字段 key
	HelperFieldCreateFrom    = "createFrom"    // 任务创建的来源,枚举值有:普通创建、导入、复制等
	HelperFieldIsApplyTpl    = "isApplyTpl"    // 是否是应用模板
	HelperFieldOperateUserId = "operateUserId" // 操作人 key
	HelperFieldIsParentDesc  = "isParentDesc"  // excel 列,是否是父任务的描述:父任务,子任务

	// 项目数据同步到无码,字段汇总
	ProBasicFieldName                = "name"
	ProBasicFieldProId               = "projectId"
	ProBasicFieldAppId               = "appId"
	ProBasicFieldCode                = "code"
	ProBasicFieldPreCode             = "preCode"
	ProBasicFieldOwnerIds            = "ownerIds" // 支持多个。值为 `U_23310`
	ProBasicFieldProTypeId           = "projectTypeId"
	ProBasicFieldPriorityId          = "priorityId" // 优先级 单选
	ProBasicFieldPlanStartTime       = "planStartTime"
	ProBasicFieldPlanEndTime         = "planEndTime"
	ProBasicFieldStatus              = "proStatus"    // 项目状态。因为无码的数据本身自带 status 字段,与北极星项目的 status 有冲突,因此,极星项目的状态字段用 proStatus 表示。
	ProBasicFieldPublicStatus        = "publicStatus" // 项目的公有、私有
	ProBasicFieldTemplateFlag        = "templateFlag" // 模板标识:1:是,2:否
	ProBasicFieldResource            = "resource"     // 项目**封面图**,在无码中,可以存储成 string
	ProBasicFieldIsFiling            = "isFiling"     // 1归档;2正常(不归档)
	ProBasicFieldRemark              = "remark"
	ProBasicFieldNotice              = "notice"
	ProBasicFieldIsEnableWorkHours   = "isEnableWorkHours"     // 是否启用工时。1启用;2未启用
	ProBasicFieldIsStared            = "isStared"              // 是否星标。1启用;2未启用
	ProBasicFieldOutCalendar         = "outCalendar"           // 外部日历日程标识
	ProBasicFieldOutCalendarSettings = "syncOutCalendarStatus" // 日历日程设置   类型是 int
	ProBasicFieldOutChat             = "outChat"               // 外部群聊标识。可以有多个
	ProBasicFieldChatSettings        = "outChatSettings"       // 群聊设置  类型是 map[string]interface{}
	ProBasicFieldParticipantIds      = "participantIds"        // 参与人/部门。如果是人,值为 `U_23310`;如果是部门,则为 `D_2312312312312`
	ProBasicFieldSort                = "sort"
	ProBasicFieldCreator             = "creator"
	ProBasicFieldUpdator             = "updator"
	ProBasicFieldCreateTime          = "createTime"
	ProBasicFieldUpdateTime          = "updateTime"
	ProBasicFieldVersion             = "version"  // 版本、乐观锁
	ProBasicFieldIsDelete            = "isDelete" // 1删除;2正常
	ProBasicFieldWorkHour            = "workHour" // 工时 存储任务的工时信息,属于**任务**字段
)
View Source
const (

	// 字段类型
	// 无码表格自定义字段类型标识:部门
	// 无码表格自定义字段类型标识:成员
	LcColumnFieldTypeSelect         = "select"         // 单选
	LcColumnFieldTypeMultiSelect    = "multiselect"    // 多选
	LcColumnFieldTypeGroupSelect    = "groupSelect"    // 分组单选
	LcColumnFieldTypeTextarea       = "textarea"       // 多行文本
	LcColumnFieldTypeInput          = "input"          // 单行文本
	LcColumnFieldTypeRichText       = "richtext"       // 富文本
	LcColumnFieldTypeMember         = "member"         // 成员
	LcColumnFieldTypeDept           = "dept"           // 部门
	LcColumnFieldTypeDatepicker     = "datepicker"     // 时间
	LcColumnFieldTypeAmount         = "amount"         // 金额
	LcColumnFieldTypeInputNumber    = "inputnumber"    // 数字
	LcColumnFieldTypeMobile         = "mobile"         // 手机号
	LcColumnFieldTypeLink           = "link"           // 链接
	LcColumnFieldTypeEmail          = "email"          // 邮箱
	LcColumnFieldTypeDocument       = "document"       // 附件
	LcColumnFieldTypeImage          = "image"          // 图片
	LcColumnFieldTypeWorkHour       = "workHour"       // 工时
	LcColumnFieldTypeRelating       = "relating"       // 关联
	LcColumnFieldTypeBaRelating     = "baRelating"     // 前后置
	LcColumnFieldTypeConditionRef   = "conditionRef"   // 条件引用
	LcColumnFieldTypeFormula        = "formula"        // 公式
	LcColumnFieldTypeSingleRelating = "singleRelating" // 单向关联

	// 机器人个人推送 - 描述任务字段值变化类型
	TrendChangeListBoChangeTypeDescAdd    = "新增"
	TrendChangeListBoChangeTypeDescUpload = "上传"
	TrendChangeListBoChangeTypeDescDelete = "删除"
	TrendChangeListBoChangeTypeDescUpdate = "更新"
)
View Source
const (
	LockCacheKeyPrefix = CacheKeyPrefix + "lock:"

	//添加用户配置的锁 + 用户id
	AddUserConfigLock = LockCacheKeyPrefix + "AddUserConfigLock:"
	//初始化用户锁 + 用户id
	InitUserLock = LockCacheKeyPrefix + "InitUserLock:"
	//添加任务时同步项目成员的锁 + projectId
	AddIssueScheduleProjectMemberLock = LockCacheKeyPrefix + "AddIssueScheduleProjectMemberLock:"

	//任务关联锁 + issueId + relationType
	AddIssueRelationLock = LockCacheKeyPrefix + "AddIssueRelationLock:"

	//文件资源锁 + orgId + relationType
	AddResourceLock = LockCacheKeyPrefix + "AddResourceLock:"

	//项目关联锁 + projectId
	AddProjectRelationLock = LockCacheKeyPrefix + "AddProjectRelationLock:"

	//项目自定义字段关联锁 + projectId
	AddProjectCustomFieldLock = LockCacheKeyPrefix + "AddProjectCustomFieldLock:"

	//任务和标签关联 + issueId
	AddIssueTagsLock = LockCacheKeyPrefix + "AddIssueTagsLock:"

	//更新用户角色权限锁
	UpdateUserOrgRoleLock = LockCacheKeyPrefix + "LockCacheKeyPrefix:"

	//ID申请时的分布式锁前缀
	IdServiceIdKey = LockCacheKeyPrefix + "IdServiceIdKey:"

	//钉钉企业初始化
	DingTalkCorpInitKey = LockCacheKeyPrefix + "DingTalkCorpInitKey:"

	// 企业微信
	WeiXinTalkCorpInitKey = LockCacheKeyPrefix + "WeiXinTalkCorpInitKey:"

	//飞书企业初始化
	FeiShuCorpInitKey = LockCacheKeyPrefix + "FeiShuCorpInitKey:"
	//泳道锁
	ProjectObjectTypeLockKey = LockCacheKeyPrefix + "DeleteProjectObjectType:"

	//飞书获取AppAccessToken时的锁
	FeiShuGetAppAccessTokenLockKey = LockCacheKeyPrefix + "FeiShuGetAppAccessTokenLockKey"

	//飞书获取TenantAccessToken时的锁
	FeiShuGetTenantAccessTokenLockKey = LockCacheKeyPrefix + "FeiShuGetTenantAccessTokenLockKey:"

	//组织权限补偿 + orgId
	RolePermissionPathCompensatoryLockKey = LockCacheKeyPrefix + "RolePermissionPathCompensatoryLockKey:"

	//用户和组织关联锁 + orgId + userId
	UserAndOrgRelationLockKey = LockCacheKeyPrefix + "UserAndOrgRelationLockEky:"

	//用户和部门关联锁 + orgId + departmentId
	UserAndDepartmentRelationLockKey = LockCacheKeyPrefix + "UserAndDepartmentRelationLockKey:"

	//创建标签锁 + projectId
	CreateTagLock = LockCacheKeyPrefix + "CreateTagLock:"

	//编辑角色锁 + orgId + projectId(如果projectId没有则为0)
	ModifyRoleLock = LockCacheKeyPrefix + "ModifyRoleLock:"

	//编辑角色权限锁 + orgId + roleId
	ModifyRolePermissionLock = LockCacheKeyPrefix + "ModifyRolePermissionLock:"

	//用户登录账户(手机号,邮箱)绑定锁 + loginName
	UserBindLoginNameLock = LockCacheKeyPrefix + "UserBindLoginNameLock:"
	UserRegisterNameLock  = LockCacheKeyPrefix + "UserRegisterNameLock:"

	//飞书日历创建锁 + projectId
	CreateCalendarLock = LockCacheKeyPrefix + "CreateCalendarLock:"

	//飞书日程创建锁 + issueId
	CreateCalendarEventLock = LockCacheKeyPrefix + "CreateCalendarEventLock:"
	// 任务创建群聊加锁 + issueId
	CreateIssueChatLock = LockCacheKeyPrefix + "CreateIssueChatLock:"

	//任务相关操作锁 + issueId(包括移动任务,创建子任务,创建标签关联)
	IssueRelateOperationLock = LockCacheKeyPrefix + "IssueRelateOperationLock:"

	//项目标签锁 + projectId
	CreateProjectTagLock = LockCacheKeyPrefix + "CreateProjectTagLock:"

	//项目文件和目录关联的锁 + targetFolderId
	UpdateResourceFolderLock = LockCacheKeyPrefix + "UpdateResourceFolderLock:"

	//添加项目群聊锁 + projectId
	AddProjectChatLock = LockCacheKeyPrefix + "AddProjectChatLock:"

	//添加迭代状态关联锁 + iterationId
	AddIterationRelationLock = LockCacheKeyPrefix + "AddIterationRelationLock:"

	//添加资源关联锁 + projectId + issueId
	AddResourceRelationLock = LockCacheKeyPrefix + "AddResourceRelationLock:"

	//检验飞书用户是否在授权范围内
	CheckFsUserLock = LockCacheKeyPrefix + "CheckFsUserLock:"

	//飞书捷径 + trigger_key
	FeishuShortcutLock = LockCacheKeyPrefix + "FeishuShortcutLock:"

	//更新部门角色权限锁
	UpdateDepartmentOrgRoleLock = LockCacheKeyPrefix + "UpdateDepartmentOrgRoleLock:"

	//获取组织开放平台信息锁
	GetOrgAppTicketLock = LockCacheKeyPrefix + "GetOrgAppTicketLock:"

	//飞书同步部门加锁
	AddFeishuDepartmentLock = LockCacheKeyPrefix + "AddFeishuDepartmentLock:"

	//迭代加锁
	IterationSortLock = LockCacheKeyPrefix + "IterationSortLock:"

	//新版本飞书组织初始化锁
	NewFeiShuCorpInitKey = LockCacheKeyPrefix + "NewFeiShuCorpInitKey:"

	//飞书获取jsapi_ticket时的锁
	FeiShuGetJSApiTicketLockKey = LockCacheKeyPrefix + "FeiShuGetJSApiTicketLockKey:"

	TransferOrgLockKey = LockCacheKeyPrefix + "TransferOrg:"

	// 批量创建任务异步任务处理
	CreateIssueAsyncTaskLockKey = LockCacheKeyPrefix + "CreateIssueAsyncTaskLockKey:"
)
View Source
const (
	FsOrderStatusNormal = "normal"
	FsOrderStatusRefund = "refund"
)
View Source
const (
	OrderStatusNoPay    = 1 //未支付
	OrderStatusComplete = 2 //已支付
	OrderStatusCancel   = 3 //已取消
	OrderStatusOverDue  = 4 //已过期
	OrderStatusPartPay  = 5 //部分支付
	OrderStatusRefund   = 6 //已退款
)
View Source
const (
	OrgMemberChangeTypeDisable    = 1
	OrgMemberChangeTypeEnable     = 2
	OrgMemberChangeTypeAdd        = 3
	OrgMemberChangeTypeRemove     = 4
	OrgMemberChangeTypeAddDisable = 5
	OrgMemberChangeTypeUpdate     = 6
)

成员变动类型定义

View Source
const (
	TokenTypeNormal = 0
	TokenTypeShare  = 1
)
View Source
const (
	//项目封面
	OssPolicyTypeProjectCover = 1
	//任务附件
	OssPolicyTypeIssueResource = 2
	//导入文件
	OssPolicyTypeIssueInputFile = 3
	//项目资源
	OssPolicyTypeProjectResource = 4
	//兼容测试
	OssPolicyTypeCompatTest = 5
	//头像
	OssPolicyTypeUserAvatar = 6
	//反馈资源
	OssPolicyTypeFeedback = 7
	//任务备注
	OssPolicyTypeIssueRemark = 8
	//任务附件(无码)
	OssPolicyTypeLesscodeResource = 9

	// excel 导入成员
	OssPolicyTypeImportMembers = 11

	// 评论添加附件
	OssPolicyTypeCommentAttachments = 12
)

oss policy类型

View Source
const (
	OssKeySegmentOrg     = "org_"
	OssKeySegmentProject = "project_"
	OssKeySegmentIssue   = "issue_"
)

oss key segment

View Source
const (
	PermissionForPro = `` /* 1579-byte string literal not displayed */

	PermissionDefaultOperationForPro = `` /* 1519-byte string literal not displayed */

	PermissionForNoProIssue = `` /* 900-byte string literal not displayed */

	PermissionForOrg = `` /* 1249-byte string literal not displayed */

)
View Source
const (
	EventDeptAdd    = "dept_add"
	EventDeptUpdate = "dept_update"
	EventDeptDel    = "dept_delete"
)
View Source
const (
	PushIssueRemind            = "PushIssueRemind"
	PushIssueCommentAndAt      = "PushIssueCommentAndAt"
	PushIssueUpdate            = "PushIssueUpdate"
	PushRelatedContentDynamics = "PushRelatedContentDynamics"
)

推送常量定义

View Source
const (
	Code                  = "编号"
	Title                 = "标题"
	Owner                 = "负责人"
	Follower              = "关注人"
	Auditor               = "确认人"
	Status                = "状态"
	Relating              = "关联"
	BaRelating            = "前后置"
	PlanStartTime         = "计划开始时间"
	PlanEndTime           = "截止时间"
	PlanWorkHour          = "计划工作时间"
	Priority              = "优先级"
	Source                = "来源"
	IssueObjectTypeId     = "类型"
	Remark                = "备注"
	PublicStatus          = "项目公开性"
	ProjectNotice         = "项目公告"
	ProjectResourcePath   = "项目封面"
	ProjectResourceName   = "项目文件名"
	ProjectResourceFolder = "项目文件父级文件夹名"
	ProjectFolderName     = "项目文件夹名"
	ProjectFolderParentId = "项目文件夹父文件夹"
	ProjectObjectType     = "任务栏"
	Project               = "项目"
	Table                 = "表格"
	Parent                = "父记录"
	ProjectPreCode        = "前缀编号"
	IssuePropertyId       = "严重程度"
	Iteration             = "迭代"
	Name                  = "名称"
	OrgField              = "组织字段"
	Value                 = "值"
	Description           = "描述"
	WorkId                = "执行者"
	StartTime             = "开始时间"
	WorkTime              = "工作时间"
	WorkContent           = "工作内容"
)
View Source
const (
	RoleSysAdmin                 = "Role.Sys.Admin"
	RoleSysManager               = "Role.Sys.Manager"
	RoleSysMember                = "Role.Sys.Member"
	RoleGroupSpecialCreator      = "RoleGroup.Special.Creator"
	RoleGroupSpecialOwner        = "RoleGroup.Special.Owner"
	RoleGroupSpecialWorker       = "RoleGroup.Special.Worker"
	RoleGroupSpecialAttention    = "RoleGroup.Special.Attention"
	RoleGroupSpecialMember       = "RoleGroup.Special.Member"
	RoleGroupSpecialVisitor      = "RoleGroup.Special.Visitor"
	RoleGroupOrgAdmin            = "RoleGroup.Org.Admin"
	RoleGroupOrgManager          = "RoleGroup.Org.Manager"
	RoleGroupProProjectManager   = "RoleGroup.Pro.ProjectManager"
	RoleGroupProTechnicalManager = "RoleGroup.Pro.TechnicalManager"
	RoleGroupProProductManager   = "RoleGroup.Pro.ProductManager"
	RoleGroupProDeveloper        = "RoleGroup.Pro.Developer"
	RoleGroupProTester           = "RoleGroup.Pro.Tester"
	RoleGroupProMember           = "RoleGroup.Pro.Member"
)
View Source
const (
	GroupLandCodeRead                   = "-2" // "查看者" "只可查看当前文件夹或者是数据表的信息,不可邀请成员和新成员信息"
	GroupLandCodeEdit                   = "-3" // "编辑者" "只可编辑当前文件夹或者是数据表的信息,不可邀请成员和新成员信息"
	GroupLandCodeFormAdministrator      = "-4" // "管理员" "可直接管理当前文件夹或者是数据表所有权限信息,并可邀请成员和新成员"
	GroupLandCodeDashboardAdministrator = "-5" // "管理员" "可直接管理当前文件夹或者是数据表所有权限信息,并可邀请成员和新成员"
	GroupLandCodeOwner                  = "41" // "管理员" "当前项目的管理员,具有项目的所有管理权限"
	GroupLandCodeProjectMember          = "42" // "编辑者" "当前项目的编辑者,可操作任务、文件、标签、附件"
	GroupLandCodeProjectViewer          = "43" // "查看者" "查看者"
)
View Source
const (
	RoleGroupSys     = "RoleGroup.Sys"
	RoleGroupSpecial = "RoleGroup.Special"
	RoleGroupOrg     = "RoleGroup.Org"
	RoleGroupPro     = "RoleGroup.Pro"
)
View Source
const (
	RoleOperationView             = "View"
	RoleOperationModify           = "Modify"
	RoleOperationDelete           = "Delete"
	RoleOperationCreate           = "Create"
	RoleOperationCheck            = "Check"
	RoleOperationInvite           = "Invite"
	RoleOperationBind             = "Bind"
	RoleOperationUnbind           = "Unbind"
	RoleOperationAttention        = "Attention"
	RoleOperationUnAttention      = "UnAttention"
	RoleOperationModifyStatus     = "ModifyStatus"
	RoleOperationComment          = "Comment"
	RoleOperationTransfer         = "Transfer"
	RoleOperationInit             = "Init"
	RoleOperationDrop             = "Drop"
	RoleOperationFiling           = "Filing"
	RoleOperationUnFiling         = "UnFiling"
	RoleOperationUpload           = "Upload"
	RoleOperationDownload         = "Download"
	RoleOperationRemove           = "Remove"
	RoleOperationModifyPermission = "ModifyPermission"
	RoleOperationCreateFolder     = "CreateFolder"
	RoleOperationModifyFolder     = "ModifyFolder"
	RoleOperationDeleteFolder     = "DeleteFolder"
	RoleOperationModifyDepartment = "ModifyDepartment"
	RoleOperationAdd              = "Add"
	RoleOperationModifyField      = "ModifyField"
	RoleOperationEnableWorkHour   = "EnableWorkHour"
	RoleOperationDisableWorkHour  = "DisableWorkHour"
	RoleOperationWithdraw         = "Withdraw"
	RoleOperationStartIssueChat   = "StartIssueChat" // 发起任务群聊
)
View Source
const (
	RoleOperationPathSys                  = "/Sys"
	RoleOperationPathSysDic               = "/Sys/Dic"
	RoleOperationPathSysSource            = "/Sys/Source"
	RoleOperationPathSysPayLevel          = "/Sys/PayLevel"
	RoleOperationPathOrgProRole           = "/Org/{org_id}/Pro/{pro_id}/Role"
	RoleOperationPathOrgProProjectVersion = "/Org/{org_id}/Pro/{pro_id}/ProjectVersion"
	RoleOperationPathOrgProProjectModule  = "/Org/{org_id}/Pro/{pro_id}/ProjectModule"
	RoleOperationPathOrgPro               = "/Org/{org_id}/Pro/{pro_id}"
	RoleOperationPathOrgProIteration      = "/Org/{org_id}/Pro/{pro_id}/Iteration"
	RoleOperationPathOrgProIssueTT        = "/Org/{org_id}/Pro/{pro_id}/Issue/6"
	RoleOperationPathOrgProIssueT         = "/Org/{org_id}/Pro/{pro_id}/Issue/4"
	RoleOperationPathOrgProIssueF         = "/Org/{org_id}/Pro/{pro_id}/Issue/2"
	RoleOperationPathOrgProIssueD         = "/Org/{org_id}/Pro/{pro_id}/Issue/3"
	RoleOperationPathOrgProIssueB         = "/Org/{org_id}/Pro/{pro_id}/Issue/5"
	RoleOperationPathOrgProIssue          = "/Org/{org_id}/Pro/{pro_id}/Issue"
	RoleOperationPathOrgProProConfig      = "/Org/{org_id}/Pro/{pro_id}/ProConfig"
	RoleOperationPathOrgProComment        = "/Org/{org_id}/Pro/{pro_id}/Comment"
	RoleOperationPathOrgProBan            = "/Org/{org_id}/Pro/{pro_id}/Ban"
	RoleOperationPathOrgUser              = "/Org/{org_id}/User"
	RoleOperationPathOrgTeam              = "/Org/{org_id}/Team"
	RoleOperationPathOrgRoleGroup         = "/Org/{org_id}/RoleGroup"
	RoleOperationPathOrgRole              = "/Org/{org_id}/Role"
	RoleOperationPathOrgProjectType       = "/Org/{org_id}/ProjectType"
	RoleOperationPathOrgProjectObjectType = "/Org/{org_id}/ProjectObjectType"
	RoleOperationPathOrgProject           = "/Org/{org_id}/Project"
	RoleOperationPathOrgProcessStep       = "/Org/{org_id}/ProcessStep"
	RoleOperationPathOrgProcessStatus     = "/Org/{org_id}/ProcessStatus"
	RoleOperationPathOrgProcess           = "/Org/{org_id}/Process"
	RoleOperationPathOrgPriority          = "/Org/{org_id}/Priority"
	RoleOperationPathOrg                  = "/Org/{org_id}"
	RoleOperationPathOrgMessageConfig     = "/Org/{org_id}/MessageConfig"
	RoleOperationPathOrgIssueSource       = "/Org/{org_id}/IssueSource"
	RoleOperationPathOrgOrgConfig         = "/Org/{org_id}/OrgConfig"
	RoleOperationPathOrgProMember         = "/Org/{org_id}/Pro/{pro_id}/Member"
	RoleOperationPathOrgProFile           = "/Org/{org_id}/Pro/{pro_id}/File"
	RoleOperationPathOrgProTag            = "/Org/{org_id}/Pro/{pro_id}/Tag"
	RoleOperationPathOrgProAttachment     = "/Org/{org_id}/Pro/{pro_id}/Attachment"
)
View Source
const (
	PermissionSysSys               = "Permission.Sys.Sys"
	PermissionSysDic               = "Permission.Sys.Dic"
	PermissionSysSource            = "Permission.Sys.Source"
	PermissionSysPayLevel          = "Permission.Sys.PayLevel"
	PermissionOrgOrg               = "Permission.Org.Org"
	PermissionOrgConfig            = "Permission.Org.Config"
	PermissionOrgMessageConfig     = "Permission.Org.MessageConfig"
	PermissionOrgUser              = "Permission.Org.User"
	PermissionOrgTeam              = "Permission.Org.Team"
	PermissionOrgRoleGroup         = "Permission.Org.RoleGroup"
	PermissionOrgRole              = "Permission.Org.Role"
	PermissionOrgProject           = "Permission.Org.Project"
	PermissionOrgProjectType       = "Permission.Org.ProjectType"
	PermissionOrgIssueSource       = "Permission.Org.IssueSource"
	PermissionOrgProjectObjectType = "Permission.Org.ProjectObjectType"
	PermissionOrgPriority          = "Permission.Org.Priority"
	PermissionOrgProcessStatus     = "Permission.Org.ProcessStatus"
	PermissionOrgProcess           = "Permission.Org.Process"
	PermissionOrgProcessStep       = "Permission.Org.ProcessStep"
	PermissionProPro               = "Permission.Pro.Pro"
	PermissionProConfig            = "Permission.Pro.Config"
	PermissionProBan               = "Permission.Pro.Ban"
	PermissionProIteration         = "Permission.Pro.Iteration"
	PermissionProIssue             = "Permission.Pro.Issue"
	PermissionProIssue2            = "Permission.Pro.Issue.2"
	PermissionProIssue3            = "Permission.Pro.Issue.3"
	PermissionProIssue4            = "Permission.Pro.Issue.4"
	PermissionProIssue5            = "Permission.Pro.Issue.5"
	PermissionProIssue6            = "Permission.Pro.Issue.6"
	PermissionProComment           = "Permission.Pro.Comment"
	PermissionProProjectVersion    = "Permission.Pro.ProjectVersion"
	PermissionProProjectModule     = "Permission.Pro.ProjectModule"
	PermissionProRole              = "Permission.Pro.Role"
	PermissionProTest              = "Permission.Pro.Test"
	PermissionProTestTestApp       = "Permission.Pro.Test.TestApp"
	PermissionProTestTestDevice    = "Permission.Pro.Test.TestDevice"
	PermissionProTestTestReport    = "Permission.Pro.Test.TestReport"
	PermissionProFile              = "Permission.Pro.File"
	PermissionProTag               = "Permission.Pro.Tag"
	PermissionProAttachment        = "Permission.Pro.Attachment"
	PermissionProMember            = "Permission.Pro.Member"
	PermissionOrgDepartment        = "Permission.Org.Department"
)

权限项

View Source
const (
	OperationSysDicView                 = "PermissionOperation.Sys.Dic.View"
	OperationSysDicCreate               = "PermissionOperation.Sys.Dic.Create"
	OperationSysDicModify               = "PermissionOperation.Sys.Dic.Modify"
	OperationSysDicDelete               = "PermissionOperation.Sys.Dic.Delete"
	OperationSysSourceView              = "PermissionOperation.Sys.Source.View"
	OperationSysSourceCreate            = "PermissionOperation.Sys.Source.Create"
	OperationSysSourceModify            = "PermissionOperation.Sys.Source.Modify"
	OperationSysSourceDelete            = "PermissionOperation.Sys.Source.Delete"
	OperationSysPayLevelView            = "PermissionOperation.Sys.PayLevel.View"
	OperationSysPayLevelCreate          = "PermissionOperation.Sys.PayLevel.Create"
	OperationSysPayLevelModify          = "PermissionOperation.Sys.PayLevel.Modify"
	OperationSysPayLevelDelete          = "PermissionOperation.Sys.PayLevel.Delete"
	OperationOrgConfigView              = "Permission.Org.Config.View"
	OperationOrgConfigModify            = "Permission.Org.Config.Modify"
	OperationOrgConfigTransfer          = "Permission.Org.Config.Transfer"
	OperationOrgConfigModifyField       = "Permission.Org.Config.ModifyField"
	OperationOrgMessageConfigView       = "Permission.Org.MessageConfig.View"
	OperationOrgMessageConfigModify     = "Permission.Org.MessageConfig.Modify"
	OperationOrgUserView                = "Permission.Org.User.View"
	OperationOrgUserModifyStatus        = "Permission.Org.User.ModifyStatus"
	OperationOrgUserInvite              = "Permission.Org.User.Invite"
	OperationOrgInviteUserInvite        = "Permission.Org.InviteUser.Invite" // 新的分组 产品:子龙
	OperationOrgTeamView                = "Permission.Org.Team.View"
	OperationOrgTeamCreate              = "Permission.Org.Team.Create"
	OperationOrgTeamModify              = "Permission.Org.Team.Modify"
	OperationOrgTeamDelete              = "Permission.Org.Team.Delete"
	OperationOrgTeamModifyStatus        = "Permission.Org.Team.ModifyStatus"
	OperationOrgTeamBind                = "Permission.Org.Team.Bind"
	OperationOrgRoleGroupView           = "Permission.Org.RoleGroup.View"
	OperationOrgRoleGroupCreate         = "Permission.Org.RoleGroup.Create"
	OperationOrgRoleGroupModify         = "Permission.Org.RoleGroup.Modify"
	OperationOrgRoleGroupDelete         = "Permission.Org.RoleGroup.Delete"
	OperationOrgRoleView                = "Permission.Org.Role.View"
	OperationOrgRoleCreate              = "Permission.Org.Role.Create"
	OperationOrgRoleModify              = "Permission.Org.Role.Modify"
	OperationOrgRoleDelete              = "Permission.Org.Role.Delete"
	OperationOrgRoleBind                = "Permission.Org.Role.Bind"
	OperationOrgProjectView             = "Permission.Org.Project.View"
	OperationOrgProjectCreate           = "Permission.Org.Project.Create"
	OperationOrgProjectModify           = "Permission.Org.Project.Modify"
	OperationOrgProjectDelete           = "Permission.Org.Project.Delete"
	OperationOrgProjectAttention        = "Permission.Org.Project.Attention"
	OperationOrgProjectFiling           = "Permission.Org.Project.Filing"
	OperationOrgProjectTypeView         = "Permission.Org.ProjectType.View"
	OperationOrgProjectTypeModify       = "Permission.Org.ProjectType.Modify"
	OperationOrgProjectTypeCreate       = "Permission.Org.ProjectType.Create"
	OperationOrgProjectTypeDelete       = "Permission.Org.ProjectType.Delete"
	OperationOrgIssueSourceView         = "Permission.Org.IssueSource.View"
	OperationOrgIssueSourceModify       = "Permission.Org.IssueSource.Modify"
	OperationOrgIssueSourceCreate       = "Permission.Org.IssueSource.Create"
	OperationOrgIssueSourceDelete       = "Permission.Org.IssueSource.Delete"
	OperationOrgProjectObjectTypeView   = "Permission.Org.ProjectObjectType.View"
	OperationOrgProjectObjectTypeModify = "Permission.Org.ProjectObjectType.Modify"
	OperationOrgProjectObjectTypeCreate = "Permission.Org.ProjectObjectType.Create"
	OperationOrgProjectObjectTypeDelete = "Permission.Org.ProjectObjectType.Delete"
	OperationOrgPriorityView            = "Permission.Org.Priority.View"
	OperationOrgPriorityModify          = "Permission.Org.Priority.Modify"
	OperationOrgPriorityCreate          = "Permission.Org.Priority.Create"
	OperationOrgPriorityDelete          = "Permission.Org.Priority.Delete"
	OperationOrgProcessStatusView       = "Permission.Org.ProcessStatus.View"
	OperationOrgProcessStatusModify     = "Permission.Org.ProcessStatus.Modify"
	OperationOrgProcessStatusCreate     = "Permission.Org.ProcessStatus.Create"
	OperationOrgProcessStatusDelete     = "Permission.Org.ProcessStatus.Delete"
	OperationOrgProcessView             = "Permission.Org.Process.View"
	OperationOrgProcessModify           = "Permission.Org.Process.Modify"
	OperationOrgProcessCreate           = "Permission.Org.Process.Create"
	OperationOrgProcessDelete           = "Permission.Org.Process.Delete"
	OperationOrgProcessStepView         = "Permission.Org.ProcessStep.View"
	OperationOrgProcessStepModify       = "Permission.Org.ProcessStep.Modify"
	OperationOrgProcessStepCreate       = "Permission.Org.ProcessStep.Create"
	OperationOrgProcessStepDelete       = "Permission.Org.ProcessStep.Delete"
	OperationProConfigView              = "Permission.Pro.Config.View"
	OperationProConfigModify            = "Permission.Pro.Config.Modify"
	OperationProConfigFiling            = "Permission.Pro.Config.Filing"
	OperationProConfigUnFiling          = "Permission.Pro.Config.UnFiling"
	OperationProConfigModifyStatus      = "Permission.Pro.Config.ModifyStatus"
	OperationProConfigDelete            = "Permission.Pro.Config.Delete"
	OperationProBanView                 = "Permission.Pro.Ban.View"
	OperationProIterationView           = "Permission.Pro.Iteration.View"
	OperationProIterationModify         = "Permission.Pro.Iteration.Modify"
	OperationProIterationCreate         = "Permission.Pro.Iteration.Create"
	OperationProIterationDelete         = "Permission.Pro.Iteration.Delete"
	OperationProIterationModifyStatus   = "Permission.Pro.Iteration.ModifyStatus"
	OperationProIterationBind           = "Permission.Pro.Iteration.Bind"
	OperationProIterationAttention      = "Permission.Pro.Iteration.Attention"
	// OperationProProjectObjectTypeModify 管理表权限(子表)(原:任务对象类型)。但考虑到任务栏无需特定的权限管理(可通过字段权限可控制)。
	OperationProProjectObjectTypeModify = "Permission.Pro.ProjectObjectType.Modify"
	OperationProProjectObjectTypeCreate = "Permission.Pro.ProjectObjectType.Create"
	OperationProProjectObjectTypeDelete = "Permission.Pro.ProjectObjectType.Delete"
	// 项目下,表的管理权限操作项
	OperationProProjectTableCreate     = "Permission.Pro.TableManage.Create"
	OperationProProjectTableModify     = "Permission.Pro.TableManage.Modify"
	OperationProProjectTableDelete     = "Permission.Pro.TableManage.Delete"
	OperationProIssue2View             = "Permission.Pro.Issue.2.View"
	OperationProIssue2Modify           = "Permission.Pro.Issue.2.Modify"
	OperationProIssue2Create           = "Permission.Pro.Issue.2.Create"
	OperationProIssue2Delete           = "Permission.Pro.Issue.2.Delete"
	OperationProIssue2ModifyStatus     = "Permission.Pro.Issue.2.ModifyStatus"
	OperationProIssue2Comment          = "Permission.Pro.Issue.2.Comment"
	OperationProIssue2Attention        = "Permission.Pro.Issue.2.Attention"
	OperationProIssue3View             = "Permission.Pro.Issue.3.View"
	OperationProIssue3Modify           = "Permission.Pro.Issue.3.Modify"
	OperationProIssue3Create           = "Permission.Pro.Issue.3.Create"
	OperationProIssue3Delete           = "Permission.Pro.Issue.3.Delete"
	OperationProIssue3ModifyStatus     = "Permission.Pro.Issue.3.ModifyStatus"
	OperationProIssue3Comment          = "Permission.Pro.Issue.3.Comment"
	OperationProIssue3Attention        = "Permission.Pro.Issue.3.Attention"
	OperationProIssue4View             = "Permission.Pro.Issue.4.View"
	OperationProIssue4Modify           = "Permission.Pro.Issue.4.Modify"
	OperationProIssue4Create           = "Permission.Pro.Issue.4.Create"
	OperationProIssue4Delete           = "Permission.Pro.Issue.4.Delete"
	OperationProIssue4ModifyStatus     = "Permission.Pro.Issue.4.ModifyStatus"
	OperationProIssue4Comment          = "Permission.Pro.Issue.4.Comment"
	OperationProIssue4Import           = "Permission.Pro.Issue.4.Import"
	OperationProIssue4Export           = "Permission.Pro.Issue.4.Export"
	OperationProIssue4Attention        = "Permission.Pro.Issue.4.Attention"
	OperationProIssue5View             = "Permission.Pro.Issue.5.View"
	OperationProIssue5Modify           = "Permission.Pro.Issue.5.Modify"
	OperationProIssue5Create           = "Permission.Pro.Issue.5.Create"
	OperationProIssue5Delete           = "Permission.Pro.Issue.5.Delete"
	OperationProIssue5ModifyStatus     = "Permission.Pro.Issue.5.ModifyStatus"
	OperationProIssue5Comment          = "Permission.Pro.Issue.5.Comment"
	OperationProIssue5Attention        = "Permission.Pro.Issue.5.Attention"
	OperationProTestIssue5View         = "Permission.Pro.Issue.5.View"
	OperationProTestIssue5Modify       = "Permission.Pro.Issue.5.Modify"
	OperationProTestIssue5Create       = "Permission.Pro.Issue.5.Create"
	OperationProTestIssue5Delete       = "Permission.Pro.Issue.5.Delete"
	OperationProTestIssue5ModifyStatus = "Permission.Pro.Issue.5.ModifyStatus"
	OperationProTestIssue5Comment      = "Permission.Pro.Issue.5.Comment"
	OperationProTestIssue5Attention    = "Permission.Pro.Issue.5.Attention"
	OperationProCommentModify          = "Permission.Pro.Comment.Modify"
	OperationProCommentDelete          = "Permission.Pro.Comment.Delete"
	OperationProProjectVersionView     = "Permission.Pro.ProjectVersion.View"
	OperationProProjectVersionModify   = "Permission.Pro.ProjectVersion.Modify"
	OperationProProjectVersionCreate   = "Permission.Pro.ProjectVersion.Create"
	OperationProProjectVersionDelete   = "Permission.Pro.ProjectVersion.Delete"
	OperationProProjectModuleView      = "Permission.Pro.ProjectModule.View"
	OperationProProjectModuleModify    = "Permission.Pro.ProjectModule.Modify"
	OperationProProjectModuleCreate    = "Permission.Pro.ProjectModule.Create"
	OperationProProjectModuleDelete    = "Permission.Pro.ProjectModule.Delete"
	OperationProRoleView               = "Permission.Pro.Role.View"
	OperationProRoleModify             = "Permission.Pro.Role.Modify"
	OperationProRoleBind               = "Permission.Pro.Role.Bind"
	OperationProTestTestAppView        = "Permission.Pro.Test.TestApp.View"
	OperationProTestTestAppCreate      = "Permission.Pro.Test.TestApp.Create"
	OperationProTestTestAppModify      = "Permission.Pro.Test.TestApp.Modify"
	OperationProTestTestAppDelete      = "Permission.Pro.Test.TestApp.Delete"
	OperationProTestTestDeviceView     = "Permission.Pro.Test.TestDevice.View"
	OperationProTestTestDeviceCreate   = "Permission.Pro.Test.TestDevice.Create"
	OperationProTestTestDeviceModify   = "Permission.Pro.Test.TestDevice.Modify"
	OperationProTestTestDeviceDelete   = "Permission.Pro.Test.TestDevice.Delete"
	OperationProTestTestReportView     = "Permission.Pro.Test.TestReport.View"
	OperationProTestTestReportCreate   = "Permission.Pro.Test.TestReport.Create"
	OperationProTestTestReportModify   = "Permission.Pro.Test.TestReport.Modify"
	OperationProTestTestReportDelete   = "Permission.Pro.Test.TestReport.Delete"
	OperationProFileView               = "Permission.Pro.File.View"
	OperationProFileUpload             = "Permission.Pro.File.Upload"
	OperationProFileDownload           = "Permission.Pro.File.Download"
	OperationProFileModify             = "Permission.Pro.File.Modify"
	OperationProFileDelete             = "Permission.Pro.File.Delete"
	OperationProFileCreateFolder       = "Permission.Pro.File.CreateFolder"
	OperationProFileModifyFolder       = "Permission.Pro.File.ModifyFolder"
	OperationProFileDeleteFolder       = "Permission.Pro.File.DeleteFolder"
	OperationProTagCreate              = "Permission.Pro.Tag.Create"
	OperationProTagDelete              = "Permission.Pro.Tag.Delete"
	OperationProTagRemove              = "Permission.Pro.Tag.Remove"
	OperationProAttachmentView         = "Permission.Pro.Attachment.View"
	OperationProAttachmentUpload       = "Permission.Pro.Attachment.Upload"
	OperationProAttachmentDownload     = "Permission.Pro.Attachment.Download"
	OperationProAttachmentDelete       = "Permission.Pro.Attachment.Delete"
	OperationProMemberBind             = "Permission.Pro.Member.Bind"
	OperationProMemberUnbind           = "Permission.Pro.Member.Unbind"
	OperationProMemberCreate           = "Permission.Pro.Member.Create"
	OperationProMemberDelete           = "Permission.Pro.Member.Delete"
	OperationProMemberModifyOperation  = "Permission.Pro.Member.ModifyPermission"
	OperationProTagModify              = "Permission.Pro.Tag.Modify"
	OperationOrgDepartmentCreate       = "Permission.Org.Department.Create"
	OperationOrgDepartmentModify       = "Permission.Org.Department.Modify"
	OperationOrgDepartmentDelete       = "Permission.Org.Department.Delete"
	OperationOrgUserBind               = "Permission.Org.User.Bind"
	OperationOrgUserUnbind             = "Permission.Org.User.Unbind"
	OperationOrgUserWatch              = "Permission.Org.User.Watch"
	OperationOrgUserModifyDepartment   = "Permission.Org.User.ModifyDepartment"
	OperationProConfigModifyField      = "Permission.Pro.Config.ModifyField"  // 项目的自定义字段
	OperationOrgProjectModifyField     = "Permission.Org.Project.ModifyField" // 组织的自定义字段
)

权限操作项

View Source
const (
	ManageGroupSys            = "ManageGroup.Sys"             // 超级管理员 1
	ManageGroupSubNormalAdmin = "ManageGroup.Sub.NormalAdmin" // bjx:普通管理员   3 // 这个数字和创建管理组入参的 groupType 对应
	ManageGroupSubNormalUser  = "ManageGroup.Sub.NormalUser"  // bjx:团队成员  4
	ManageGroupSubUserCustom  = "ManageGroup.Sub.UserCustom"  // 用户创建的管理组 6
)
View Source
const (
	OssConfigMissingSentence = "oss configuration is missing!"
	DBOpenErrorSentence      = "db.Open(): %q\n"
	TxOpenErrorSentence      = "tx.Open(): %q\n"
	UserLoginSentence        = "当前登录用户 %d 组织 %d "
)
View Source
const (
	ServiceNamePermission = "permissionsvc"
	// 无码系统中的 app 服务
	ServiceNameLcApp = "lesscodeappsvc"
	// 无码系统:表单服务
	ServiceNameLcForm = "lesscodeformsvc"
	// 无码系统:数据中心服务
	ServiceNameLcDatacenter = "lesscodedatacentersvc"
	// ServiceNameLcUserCenter 无码系统:用户服务
	ServiceNameLcUserCenter = "usercentersvc"

	// go-table
	ServiceTable = "tablesvc"

	ServiceDashboard = "lesscodedashboard"

	// go-push
	ServicePush = "pushsvc"

	// go-automation
	ServiceAutomation = "automationsvc"

	// n8n
	ServiceN8n        = "n8n"
	ServiceN8nWebhook = "n8nwebhook"
)
View Source
const (
	// 项目和迭代 固定的状态值
	StatusIdNotStart = 1 // 未开始
	StatusIdRunning  = 2 // 进行中
	StatusIdComplete = 3 // 已完成

	// 项目和迭代 固定的状态分类
	StatusTypeNotStart = 1 // 未开始
	StatusTypeRunning  = 2 // 进行中
	StatusTypeComplete = 3 // 已完成

	// 项目和迭代 固定的状态名
	StatusNameNotStart = "未开始"
	StatusNameRunning  = "进行中"
	StatusNameComplete = "已完成"

	// 项目
	StatusLangCodeProjectNotStart = "ProcessStatus.Project.NotStart"
	StatusLangCodeProjectRunning  = "ProcessStatus.Project.Running"
	StatusLangCodeProjectComplete = "ProcessStatus.Project.Complete"

	// 迭代
	StatusLangCodeIterationNotStart = "ProcessStatus.Iteration.NotStart"
	StatusLangCodeIterationRunning  = "ProcessStatus.Iteration.Running"
	StatusLangCodeIterationComplete = "ProcessStatus.Iteration.Complete"

	// 任务
	StatusLangCodeIssueNotStart       = "ProcessStatus.Issue.NotStart"
	StatusLangCodeIssueWaitEvaluate   = "ProcessStatus.Issue.WaitEvaluate"
	StatusLangCodeIssueWaitConfirmBug = "ProcessStatus.Issue.WaitConfirmBug"
	StatusLangCodeIssueConfirmedBug   = "ProcessStatus.Issue.ConfirmedBug"
	StatusLangCodeIssueReOpen         = "ProcessStatus.Issue.ReOpen"
	StatusLangCodeIssueEvaluated      = "ProcessStatus.Issue.Evaluated"
	StatusLangCodeIssuePlanning       = "ProcessStatus.Issue.Planning"
	StatusLangCodeIssueDesign         = "ProcessStatus.Issue.Design"
	StatusLangCodeIssueProcessing     = "ProcessStatus.Issue.Processing"
	StatusLangCodeIssueDevelopment    = "ProcessStatus.Issue.Development"
	StatusLangCodeIssueWaitTest       = "ProcessStatus.Issue.WaitTest"
	StatusLangCodeIssueTesting        = "ProcessStatus.Issue.Testing"
	StatusLangCodeIssueWaitRelease    = "ProcessStatus.Issue.WaitRelease"
	StatusLangCodeIssueWait           = "ProcessStatus.Issue.Wait"
	StatusLangCodeIssueRepair         = "ProcessStatus.Issue.Repair"
	StatusLangCodeIssueSuccess        = "ProcessStatus.Issue.Success"
	StatusLangCodeIssueFail           = "ProcessStatus.Issue.Fail"
	StatusLangCodeIssueReleased       = "ProcessStatus.Issue.Released"
	StatusLangCodeIssueClosed         = "ProcessStatus.Issue.Closed"
	StatusLangCodeIssueComplete       = "ProcessStatus.Issue.Complete"
	StatusLangCodeIssueConfirmed      = "ProcessStatus.Issue.Confirmed"
)
View Source
const (
	FontStyleNotStart = "#5f5f5f"
	FontStyleRunning  = "#377aff"
	FontStyleComplete = "#54a944"
	BgStyleNotStart   = "#f5f6f5"
	BgStyleRunning    = "#ecf5fc"
	BgStyleComplete   = "#edf8ed"
)
View Source
const (

	//-1: 待确认 1:未完成,2:已完成,3:未开始,4:进行中 5: 已逾期
	// 待确认
	IssueStatusNone = -1
	// 未完成
	IssueStatusUnfinished = 1
	// 已完成
	IssueStatusFinished = 2
	// 未开始
	IssueStatusNotStarted = 3
	// 进行中
	IssueStatusProcessing = 4
	// 已逾期
	IssueStatusOverdue = 5
)
View Source
const (
	TcId                = "id"
	TcName              = "name"
	TcNamePinyin        = "name_pinyin"
	TcCode              = "code"
	TcSecret            = "secret"
	TcSecret1           = "secret1"
	TcSecret2           = "secret2"
	TcOwner             = "owner"
	TcOwnerChangeTime   = "owner_change_time"
	TcCheckStatus       = "check_status"
	TcStatus            = "status"
	TcStatDate          = "stat_date"
	TcDate              = "date"
	TcCreator           = "creator"
	TcCreateTime        = "create_time"
	TcUpdator           = "updator"
	TcUpdateTime        = "update_time"
	TcVersion           = "version"
	TcIsDelete          = "is_delete"
	TcDelFlag           = "del_flag"
	TcColumnId          = "column_id"
	TcSysVersion        = "sys_version"
	TcFeatureInfo       = "feature_info"
	TcBugFixInfo        = "bug_fix_info"
	TcChangeLnfo        = "change_lnfo"
	TcDeprecatedInfo    = "deprecated_info"
	TcExt               = "ext"
	TcUserViewLocation  = "user_view_location_config"
	TcReleaseTime       = "release_time"
	TcK                 = "k"
	TcV                 = "v"
	TcOrgId             = "org_id"
	TcMaxId             = "max_id"
	TcStep              = "step"
	TcLangCode          = "lang_code"
	TcStorage           = "storage"
	TcMemberCount       = "member_count"
	TcPrice             = "price"
	TcMemberPrice       = "member_price"
	TcDuration          = "duration"
	TcIsShow            = "is_show"
	TcSort              = "sort"
	TcRemark            = "remark"
	TcTopic             = "topic"
	TcMessageKey        = "message_key"
	TcMessage           = "message"
	TcGroupName         = "group_name"
	TcMessageId         = "message_id"
	TcLastConsumerTime  = "last_consumer_time"
	TcFailCount         = "fail_count"
	TcFailTime          = "fail_time"
	TcTimeZone          = "time_zone"
	TcTimeDifference    = "time_difference"
	TcPayLevel          = "pay_level"
	TcPayStartTime      = "pay_start_time"
	TcPayEndTime        = "pay_end_time"
	TcWebSite           = "web_site"
	TcLanguage          = "language"
	TcRemindSendTime    = "remind_send_time"
	TcDatetimeFormat    = "datetime_format"
	TcPasswordLength    = "password_length"
	TcPasswordRule      = "password_rule"
	TcMaxLoginFailCount = "max_login_fail_count"
	TcEmailStatus       = "email_status"
	TcSmtpServer        = "smtp_server"
	TcSmtpPort          = "smtp_port"
	TcSmtpUserName      = "smtp_user_name"
	TcSmtpPassword      = "smtp_password"
	TcEmailFormat       = "email_format"
	TcSenderAddress     = "sender_address"
	TcEmailEncode       = "email_encode"
	TcIndustryId        = "industry_id"
	TcScale             = "scale"
	TcSourceChannel     = "source_channel"
	TcContinentId       = "continent_id"
	TcCountryId         = "country_id"
	//这个就是省的id和TcProvinceId一样在不同表不一样的叫法
	TcStateId                         = "state_id"
	TcProvinceId                      = "province_id"
	TcCityId                          = "city_id"
	TcAddress                         = "address"
	TcLogoUrl                         = "logo_url"
	TcResourceId                      = "resource_id"
	TcFolderId                        = "folder_id"
	TcIsAuthenticated                 = "is_authenticated"
	TcInitStatus                      = "init_status"
	TcInitVersion                     = "init_version"
	TcOutOrgId                        = "out_org_id"
	TcIndustry                        = "industry"
	TcAuthTicket                      = "auth_ticket"
	TcAuthLevel                       = "auth_level"
	TcLoginName                       = "login_name"
	TcLoginNameEditCount              = "login_name_edit_count"
	TcEmail                           = "email"
	TcMobile                          = "mobile"
	TcAvatar                          = "avatar"
	TcBirthday                        = "birthday"
	TcSex                             = "sex"
	TcPassword                        = "password"
	TcPasswordSalt                    = "password_salt"
	TcMotto                           = "motto"
	TcLastLoginIp                     = "last_login_ip"
	TcLastLoginTime                   = "last_login_time"
	TcLoginFailCount                  = "login_fail_count"
	TcUserId                          = "user_id"
	TcUserIds                         = "user_ids"
	TcGlobalUserId                    = "global_user_id"
	TcLastLoginUserId                 = "last_login_user_id"
	TcLastLoginOrgId                  = "last_login_org_id"
	TcDailyReportMessageStatus        = "daily_report_message_status"
	TcDefaultProjectId                = "default_project_id"
	TcDailyProjectReportMessageStatus = "daily_project_report_message_status"
	TcOwnerRangeStatus                = "owner_range_status"
	TcParticipantRangeStatus          = "participant_range_status"
	TcAttentionRangeStatus            = "attention_range_status"
	TcCreateRangeStatus               = "create_range_status"
	TcRemindMessageStatus             = "remind_message_status"
	TcCommentAtMessageStatus          = "comment_at_message_status"
	TcModifyMessageStatus             = "modify_message_status"
	TcRelationMessageStatus           = "relation_message_status"
	TcCollaborateMessageStatus        = "collaborate_message_status" // 给协作人推送任务变更信息状态配置项 key
	TcDefaultProjectObjectTypeId      = "default_project_object_type_id"
	TcPcNoticeOpenStatus              = "pc_notice_open_status"
	TcPcIssueRemindMessageStatus      = "pc_issue_remind_message_status"
	TcPcOrgMessageStatus              = "pc_org_message_status"
	TcPcProjectMessageStatus          = "pc_project_message_status"
	TcPcCommentAtMessageStatus        = "pc_comment_at_message_status"
	TcRemindExpiring                  = "remind_expiring"
	TcConversationId                  = "conversation_id"
	TcTopTraceId                      = "top_trace_id"

	TcUseStatus                = "use_status"
	TcOutOrgUserId             = "out_org_user_id"
	TcOutUserId                = "out_user_id"
	TcIsActive                 = "is_active"
	TcJobNumber                = "job_number"
	TcProjectId                = "project_id"
	TcProjectObjectTypeId      = "project_object_type_id"
	TcTitle                    = "title"
	TcPriorityId               = "priority_id"
	TcSourceId                 = "source_id"
	TcIssueObjectTypeId        = "issue_object_type_id"
	TcPlanStartTime            = "plan_start_time"
	TcPlanEndTime              = "plan_end_time"
	TcStartTime                = "start_time"
	TcEndTime                  = "end_time"
	TcPlanWorkHour             = "plan_work_hour"
	TcIterationId              = "iteration_id"
	TcVersionId                = "version_id"
	TcModuleId                 = "module_id"
	TcParentId                 = "parent_id"
	TcIsHide                   = "is_hide"
	TcIssueId                  = "issue_id"
	TcStoryPoint               = "story_point"
	TcTags                     = "tags"
	TcTagId                    = "tag_id"
	TcRelationId               = "relation_id"
	TcRelationType             = "relation_type"
	TcPackage                  = "package"
	TcIcon                     = "icon"
	TcAppId                    = "app_id"
	TcAppVersion               = "app_version"
	TcPreCode                  = "pre_code"
	TcProjectTypeId            = "project_type_id"
	TcPublicStatus             = "public_status"
	TcIsFiling                 = "is_filing"
	TcTeamId                   = "team_id"
	TcType                     = "type"
	TcBgStyle                  = "bg_style"
	TcFontStyle                = "font_style"
	TcIsDefault                = "is_default"
	TcProcessId                = "process_id"
	TcProcessStatusId          = "process_status_id"
	TcIsInitStatus             = "is_init_status"
	TcCategory                 = "category"
	TcStartStatus              = "start_status"
	TcEndStatus                = "end_status"
	TcObjectType               = "object_type"
	TcIsReadonly               = "is_readonly"
	TcDefaultProcessId         = "default_process_id"
	TcPath                     = "path"
	TcSuffix                   = "suffix"
	TcMd5                      = "md5"
	TcPermissionId             = "permission_id"
	TcOperationCodes           = "operation_codes"
	TcIsModifyPermission       = "is_modify_permission"
	TcRoleGroupId              = "role_group_id"
	TcRoleId                   = "role_id"
	TcPermissionPath           = "permission_path"
	TcContent                  = "content"
	TcContentMd5               = "content_md5"
	TcFinishTime               = "finish_time"
	TcTrendsId                 = "trends_id"
	TcInfo                     = "info"
	TcFailMsg                  = "fail_msg"
	TcFinishStatus             = "finish_status"
	TcFinishMsg                = "finish_msg"
	TcNickName                 = "nick_name"
	TcDepartmentId             = "department_id"
	TcOutOrgDepartmentId       = "out_org_department_id"
	TcObjectId                 = "object_id"
	TcModule1                  = "module1"
	TcModule2Id                = "module2_id"
	TcModule2                  = "module2"
	TcModule3Id                = "module3_id"
	TcModule3                  = "module3"
	TcOperCode                 = "oper_code"
	TcOperObjId                = "oper_obj_id"
	TcOperObjType              = "oper_obj_type"
	TcOperObjProperty          = "oper_obj_property"
	TcNewValue                 = "new_value"
	TcOldValue                 = "old_value"
	TcAppVersionId             = "app_version_id"
	TcGroupId                  = "group_id"
	TcCaseId                   = "case_id"
	TcPreCondition             = "pre_condition"
	TcStepDesc                 = "step_desc"
	TcExpectDesc               = "expect_desc"
	TcIterId                   = "iter_id"
	TcDefaultTesterId          = "default_tester_id"
	TcPlanDesc                 = "plan_desc"
	TcSelectiveType            = "selective_type"
	TcTesterId                 = "tester_id"
	TcPlanCaseId               = "plan_case_id"
	TcCaseStepId               = "case_step_id"
	TcActualResultDesc         = "actual_result_desc"
	TcUuid                     = "uuid"
	TcSourcePlatForm           = "source_platform"
	TcNoticer                  = "noticer"
	TcHost                     = "host"
	TcAuditorId                = "auditor_id"
	TcAuditTime                = "audit_time"
	TcStatusChangerId          = "status_changer_id"
	TcStatusChangeTime         = "status_change_time"
	TcSourceType               = "source_type" //2019/12/25新增资源文件来源类型
	TcFileType                 = "file_type"   //2019/12/30新增文件类型
	TcRelationCode             = "relation_code"
	TcRemarkDetail             = "remark_detail"
	TcStatusId                 = "status_id"
	TcPropertyId               = "property_id"
	TcFunctionCode             = "function_code"
	TcOrderId                  = "order_id"
	TcOutPlanId                = "out_plan_id"
	TcRemindBindPhone          = "remind_bind_phone"
	TcGoodsCode                = "goods_code"
	TcItemCode                 = "item_code"
	TcIsLeader                 = "is_leader"
	TcIsRegister               = "is_register"
	TcLastInviteTime           = "last_invite_time"
	TcIsOrgField               = "is_org_field"
	TcFieldValue               = "field_value"
	TcCustomField              = "custom_field"
	TcIsSysField               = "is_sys_field"
	TcDesc                     = "desc"
	TcWorkerId                 = "worker_id"
	TcNeedTime                 = "need_time"
	TcRemainTimeCalType        = "remain_time_cal_type"
	TcRemainTime               = "remain_time"
	TcTriggerKey               = "trigger_key"
	TcTriggerId                = "trigger_id"
	TcViewType                 = "view_type"
	TcClosedDefaultField       = "closed_default_field"
	TcClosedCustomField        = "closed_custom_field"
	TcOutOrgDepartmentParentId = "out_org_department_parent_id"
	TcAuditStatus              = "audit_status"
	// 任务视图
	TcIssueViewName = "view_name"
	TcIsPrivate     = "is_private"
	TcConfig        = "config"
	TcFieldType     = "field_type"
	TcSeats         = "seats"

	TcBasicShowSetting = "basic_show_setting"
	TcTemplateFlag     = "template_flag"

	TcTenantCode = "tenant_code"

	// 实验室功能的config开关字段
	TcLabConfig = "config"
	TcTableId   = "table_id"

	// 群聊表字段名
	TcChatSetting = "chat_settings"
	TcChatType    = "chat_type"
	TcChatId      = "chat_id"
	TcIsEnable    = "is_enable"

	TcPricePlanType = "price_plan_type"

	TcEditionId = "edition_id"

	TcOutOrderNo = "out_order_no"

	// 待办
	TcOperators = "operators"

	TcWeiXinOpenId = "wei_xin_open_id"
	TcThirdUserId  = "third_user_id"

	TcViewId        = "view_id"
	TcShareKey      = "share_key"
	TcSharePassword = "share_password"
)
View Source
const (
	CreateColumn = iota + 1
	UpdateColumn
	CopyColumn
	DeleteColumn
)
View Source
const (
	//TableIssueTag            = "ppm_pri_issue_tag"
	TableObjectId            = "ppm_bas_object_id"
	TablePayLevel            = "ppm_bas_pay_level"
	TableSourceChannel       = "ppm_bas_source_channel"
	TableOrganization        = "ppm_org_organization"
	TableOrganizationOutInfo = "ppm_org_organization_out_info"
	TableUser                = "ppm_org_user"
	TableUserConfig          = "ppm_org_user_config"
	TableUserOrganization    = "ppm_org_user_organization"
	TableUserOutInfo         = "ppm_org_user_out_info"
	TableIssue               = "ppm_pri_issue"
	//TableIssueDetail                  = "ppm_pri_issue_detail"
	TableIssueRelation           = "ppm_pri_issue_relation"
	TableIssueWorkHours          = "ppm_pri_issue_work_hours"
	TableIssueView               = "ppm_pri_issue_view"
	TableIteration               = "ppm_pri_iteration"
	TableProject                 = "ppm_pro_project"
	TableProjectDetail           = "ppm_pro_project_detail"
	TableProjectRelation         = "ppm_pro_project_relation"
	TableProjectChat             = "ppm_pro_project_chat"
	TableIssueSource             = "ppm_prs_issue_source"
	TableProjectObjectType       = "ppm_prs_project_object_type"
	TableProjectType             = "ppm_prs_project_type"
	TableResource                = "ppm_res_resource"
	TablePermission              = "ppm_rol_permission"
	TablePermissionOperation     = "ppm_rol_permission_operation"
	TableRole                    = "ppm_rol_role"
	TableRoleOperation           = "ppm_rol_operation"
	TableRoleGroup               = "ppm_rol_role_group"
	TableRolePermissionOperation = "ppm_rol_role_permission_operation"
	TableRoleUser                = "ppm_rol_role_user"
	TableShare                   = "ppm_sha_share"
	TableOrgConfig               = "ppm_orc_config"
	TableMessage                 = "ppm_tak_message"
	TableComment                 = "ppm_tre_comment"
	TableTrends                  = "ppm_tre_trends"

	TableIterationStat  = "ppm_sta_iteration_stat"
	TableProjectDayStat = "ppm_sta_project_day_stat"
	TableStatDailyApp   = "lc_stat_daily_app"

	TableDepartment        = "ppm_org_department"
	TableDepartmentOutInfo = "ppm_org_department_out_info"
	TableUserDepartment    = "ppm_org_user_department"

	TableContact                 = "ppm_wst_contact"
	TableTag                     = "ppm_pri_tag"
	TableNotice                  = "ppm_tre_notice"
	TableArea                    = "ppm_cmm_area"
	TableCities                  = "ppm_cmm_cities"
	TableContinents              = "ppm_cmm_continents"
	TableCountries               = "ppm_cmm_countries"
	TableIndustry                = "ppm_cmm_industry"
	TableMobilePrefix            = "ppm_cmm_area"
	TableRegions                 = "ppm_cmm_regions"
	TableStates                  = "ppm_cmm_states"
	TableFolder                  = "ppm_res_folder"
	TableFolderResource          = "ppm_res_folder_resource"
	TableIssueProperty           = "ppm_prs_issue_property"
	TableIterationStatusRelation = "ppm_pri_iteration_status_relation"
	TableOrgFunctionConfig       = "ppm_orc_function_config"

	TableOrgUserLoginRecord = "ppm_org_user_login_record"
	TableUserInvite         = "ppm_org_user_invite"

	TableOrderFs            = "ppm_ord_order_fs"
	TableOrder              = "ppm_ord_order"
	TablePricePlanFs        = "ppm_ord_price_plan_fs"
	TablePricePlanDing      = "ppm_ord_price_plan_ding"
	TableOrderFunction      = "ppm_ord_function"
	TableOrderFunctionLevel = "ppm_ord_function_level"
	TableResourceRelation   = "ppm_res_resource_relation"
	TableRecycleBin         = "ppm_prs_recycle_bin"
	TableOrderDing          = "ppm_ord_order_ding"
	TableBasPayLevel        = "ppm_bas_pay_level"
	TableOrderWeiXin        = "ppm_ord_order_weixin"

	TableCustomField = "ppm_pro_custom_field"

	TableOrgSecret = "ppm_org_secret"

	TableRoleDepartment = "ppm_rol_role_department"

	TableLcApp     = "lc_app"
	TableLcAppView = "lc_app_view"

	TableLcPerManageGroup       = "lc_per_manage_group"
	TablePrivatizationAuthority = "ppm_org_privatization_authority"
	TablePrivatizationRecords   = "ppm_org_privatization_records"

	TableLabConfig       = "ppm_org_lab_config"
	TableProjectMenu     = "ppm_pro_project_menu_config"
	TableOrgUserLocation = "ppm_org_user_view_location"
)
View Source
const (
	TrendsModuleOrg     = "Org"
	TrendsModuleProject = "Project"
	TrendsModuleIssue   = "Issue"
	TrendsModuleRole    = "Role"
)
View Source
const (
	TrendsOperObjectTypeIssue    = "Issue"
	TrendsOperObjectTypeComment  = "Comment"
	TrendsOperObjectTypeWorkHour = "WorkHour"
	TrendsOperObjectTypeProject  = "Project"
	TrendsOperObjectTypeRole     = "Role"
	TrendsOperObjectTypeUser     = "User"
	TrendsOperObjectTypeOrg      = "Org"
	TrendsOperObjectTypeField    = "Field"
)
View Source
const (
	//新增任务
	TrendsRelationTypeCreateIssue = "AddIssue"
	//添加评论
	TrendsRelationTypeCreateIssueComment = "AddIssueComment"
	//新增任务(子)
	TrendsRelationTypeCreateChildIssue = "AddChildIssue"
	//更新任务
	TrendsRelationTypeUpdateIssue = "UpdIssue"
	//更新任务状态
	TrendsRelationTypeUpdateIssueStatus = "UpdIssueStatus"
	//删除任务
	TrendsRelationTypeDeleteIssue = "DelIssue"
	//删除任务(子)
	TrendsRelationTypeDeleteChildIssue = "DelChildIssue"
	//添加关注人
	TrendsRelationTypeAddedIssueFollower = "AddIssueFollower"
	//去除关注人
	TrendsRelationTypeDeleteIssueFollower = "DelIssueFollower"
	//添加成员
	TrendsRelationTypeAddedIssueParticipant = "AddIssueParticipant"
	//修改任务负责人
	TrendsRelationTypeUpdateIssueOwner = "UpdateIssueOwner"
	// 添加负责人
	TrendsRelationTypeAddedIssueOwner = "AddIssueOwner"
	// 去除负责人
	TrendsRelationTypeDeleteIssueOwner = "DelIssueOwner"
	//删除成员
	TrendsRelationTypeDeletedIssueParticipant = "DelIssueParticipant"
	//添加关联任务
	TrendsRelationTypeAddRelationIssue = "AddRelationIssue"
	//添加单向关联任务
	TrendsRelationTypeAddSingleRelationIssue = "AddSingleRelationIssue"
	//被添加关联任务
	TrendsRelationTypeAddRelationIssueByOther = "AddRelationIssueByOther"
	//删除关联任务
	TrendsRelationTypeDeleteRelationIssue = "DelRelationIssue"
	//删除单向关联任务
	TrendsRelationTypeDeleteSingleRelationIssue = "DelSingleRelationIssue"
	//被删除关联任务
	TrendsRelationTypeDeleteRelationIssueByOther = "DelRelationIssueByOther"
	//上传附件
	TrendsRelationTypeUploadResource = "UploadResource"
	//删除附件
	TrendsRelationTypeDeleteResource = "DeleteResource"
	// 上传图片
	TrendsRelationTypeUploadPicture = "UploadPicture"
	// 删除图片
	TrendsRelationTypeDeletePicture = "DeletePicture"
	//删除项目附件
	TrendsRelationTypeDeleteProjectResource = "DeleteProjectResource"
	//变更任务栏
	//TrendsRelationTypeUpdateIssueProjectObjectType = "UpdateIssueProjectObjectType"
	//增加任务标签
	TrendsRelationTypeAddIssueTag = "AddIssueTag"
	//删除任务标签
	TrendsRelationTypeDeleteIssueTag = "DelIssueTag"
	//恢复任务
	TrendsRelationTypeRecoverIssue = "RecoverIssue"
	//引用附件
	TrendsRelationTypeReferResource = "ReferResource"
	//删除引用附件
	TrendsRelationTypeDelReferResource = "DelReferResource"
	// 新增工时
	TrendsRelationTypeCreateWorkHour = "AddIssueWorkHour"
	// 编辑工时
	TrendsRelationTypeUpdateIssueWorkHour = "UpdateIssueWorkHour"
	// 删除工时
	TrendsRelationTypeDeleteIssueWorkHour = "DeleteIssueWorkHour"
	//添加前置任务
	TrendsRelationTypeAddBeforeIssue = "AddBeforeIssue"
	//被添加后置任务
	TrendsRelationTypeAddAfterIssueByOther = "AddAfterIssueByOther"
	//添加后置任务
	TrendsRelationTypeAddAfterIssue = "AddAfterIssue"
	//被添加前置任务
	TrendsRelationTypeAddBeforeIssueByOther = "AddBeforeIssueByOther"
	//删除前置任务
	TrendsRelationTypeDeleteBeforeIssue = "DeleteBeforeIssue"
	//被删除后置任务
	TrendsRelationTypeDeleteAfterIssueByOther = "DeleteAfterIssueByOther"
	//删除后置任务
	TrendsRelationTypeDeleteAfterIssue = "DeleteAfterIssue"
	//被删除前置任务
	TrendsRelationTypeDeleteBeforeIssueByOther = "DeleteBeforeIssueByOther"
	//审核任务
	TrendsRelationTypeAuditIssue = "AuditIssue"
	//撤回任务
	TrendsRelationTypeWithdrawIssue = "WithdrawIssue"
	//添加确认人
	TrendsRelationTypeAddedIssueAuditor = "AddIssueAuditor"
	//删除确认人
	TrendsRelationTypeDeleteIssueAuditor = "DelIssueAuditor"
	TrendsRelationTypeStartIssueChat     = "StartIssueChat" // 发起任务群聊
	//变更项目表
	TrendsRelationTypeUpdateIssueProjectTable = "UpdateIssueProjectTable"
	//变更父任务
	TrendsRelationTypeUpdateIssueParent = "UpdateIssueParent"
)

动态事件,放于relationType字段,长度限制32(任务)

View Source
const (
	//创建项目
	TrendsRelationTypeCreateProject = "AddProject"
	//更新项目
	TrendsRelationTypeUpdateProject = "UpdProject"
	//关注项目
	TrendsRelationTypeStarProject = "StarProject"
	//取关项目
	TrendsRelationTypeUnstarProject = "UnstarProject"
	//退出项目
	TrendsRelationTypeUnbindProject = "UnbindProject"
	//更新项目状态
	TrendsRelationTypeUpdateProjectStatus = "UpdProjectStatus"
	//修改项目负责人
	TrendsRelationTypeUpdateProjectOwner = "UpdateProjectOwner"
	//添加关注人
	TrendsRelationTypeAddedProjectOwner = "AddProjectOwner"
	//去除关注人
	TrendsRelationTypeDeleteProjectOwner = "DelProjectOwner"
	//添加关注人
	TrendsRelationTypeAddedProjectFollower = "AddProjectFollower"
	//去除关注人
	TrendsRelationTypeDeleteProjectFollower = "DelProjectFollower"
	//添加成员
	TrendsRelationTypeAddedProjectParticipant = "AddProjectParticipant"
	//删除成员
	TrendsRelationTypeDeletedProjectParticipant = "DelProjectParticipant"
	//批量插入任务
	TrendsRelationTypeCreateIssueBatch = "CreateIssueBatch"
	//上传文件
	TrendsRelationTypeUploadProjectFile = "UploadProjectFile"
	//更新文件
	TrendsRelationTypeUpDateProjectFile = "UpdateProjectFile"
	//更新文件所属文件夹
	TrendsRelationTypeUpDateProjectFileFolder = "UpdateProjectFileFolder"
	//删除文件
	TrendsRelationTypeDeleteProjectFile = "DeleteProjectFile"
	//创建文件夹
	TrendsRelationTypeCreateProjectFolder = "CreateProjectFolder"
	//更新文件夹
	TrendsRelationTypeUpdateProjectFolder = "UpdateProjectFolder"
	//删除文件夹
	TrendsRelationTypeDeleteProjectFolder = "DeleteProjectFolder"
	//删除项目
	TrendsRelationTypeDeleteProject = "DeleteProject"
	//恢复标签
	TrendsRelationTypeRecoverTag = "RecoverTag"
	//删除项目标签
	TrendsRelationTypeDeleteProjectTag = "DeleteProjectTag"
	//恢复文件夹
	TrendsRelationTypeRecoverFolder = "RecoverFolder"
	//恢复文件
	TrendsRelationTypeRecoverProjectFile = "RecoverProjectFile"
	//恢复附件
	TrendsRelationTypeRecoverProjectAttachment = "RecoverProjectAttachment"
	//创建自定义字段
	TrendsRelationTypeAddCustomField = "AddCustomField"
	//删除自定义字段
	TrendsRelationTypeDeleteCustomField = "DeleteCustomField"
	//启用自定义字段
	TrendsRelationTypeUseCustomField = "UseCustomField"
	//禁用自定义字段
	TrendsRelationTypeForbidCustomField = "ForbidCustomField"
	//编辑自定义字段
	TrendsRelationTypeUpdateCustomField = "UpdateCustomField"
	//使用自定义字段
	TrendsRelationTypeUseOrgCustomField = "UseOrgCustomField"
	// 启用工时
	TrendsRelationTypeEnableWorkHour = "EnableWorkHour"
	// 禁用工时
	TrendsRelationTypeDisableWorkHour = "DisableWorkHour"
	// 操作字段变动
	TrendsRelationTypeUpdateFormField = "UpdateFormField"
)

动态事件,放于relationType字段,长度限制32(项目)

View Source
const (
	NoticeTypeIssueCommentAtSomebody = "IssueCommentAtSomebody"
	NoticeTypeIssueRemarkAtSomebody  = "IssueRemarkAtSomebody"
)

@相关事件(放于notice表中,但独立于其余类型的notice)

View Source
const (
	TrendsOperObjPropertyNameStatus      = "status"
	TrendsOperObjPropertyNameFollower    = "follower"
	TrendsOperObjPropertyNameParticipant = "participant"
	TrendsOperObjPropertyNameOwner       = "owner"
	TrendsOperObjPropertyNameAuditor     = "auditor"
)

动态修改字段名称定义

View Source
const (
	MyOverDueViewConfig = `` /* 3029-byte string literal not displayed */

	MyDailyDueOfTodayViewConfig = `` /* 2746-byte string literal not displayed */

	OverDueSoonViewConfig = `` /* 3609-byte string literal not displayed */

	MyPendingViewConfig = `` /* 2268-byte string literal not displayed */

	AllOverDueSoonViewConfig = `` /* 3025-byte string literal not displayed */

	AllOverDueViewConfig = `` /* 2759-byte string literal not displayed */

	OverDueViewConfig = `` /* 1774-byte string literal not displayed */

	AllUnFinishedViewConfig = `` /* 1426-byte string literal not displayed */

	OwnerViewConfig = `` /* 665-byte string literal not displayed */

	AllIssueViewConfig = `{
    "condition": {},
    "realCondition": {},
    "projectObjectTypeId": 0,
    "tableId": "0"
}`
)
View Source
const ApiVersionFsChat = "1.4.3"

api版本(增加了飞书群聊功能)

View Source
const AppApplicationName = "app"

app服务的项目名

View Source
const AppDateFormat = "2006-01-02"

全局日期格式

View Source
const AppSystemTimeFormat = "2006-01-02T15:04:05Z"
View Source
const AppSystemTimeFormat8 = "2006-01-02T15:04:05+08:00"
View Source
const AppTimeFormat = "2006-01-02 15:04:05"
View Source
const AppTimeFormatYYYYMMDDHHmm = "2006-01-02 15:04"
View Source
const AppTimeFormatYYYYMMDDHHmmTimezone = "2006-01-02 15:04 -0700"
View Source
const AvatarForUnallocated = "http://attachments.startable.cn/front_resources/Unallocated.png"

未分配用户默认头像

View Source
const (
	BASE_PAY_LEVEL = `` /* 659-byte string literal not displayed */

)
View Source
const BlankDate = "1970-01-01"
View Source
const BlankElasticityTime = "1970-01-02 00:00:00"
View Source
const BlankEmptyTime = "0001-01-01 00:00:00"
View Source
const BlankString = ""

默认空字符串

View Source
const BlankTime = "1970-01-01 00:00:00"

默认空时间

View Source
const CacheKeyOfAddressType = "addressType_{{." + CacheKeyAddressTypeConstName + "}}:"
View Source
const CacheKeyOfApp = "app_{{." + CacheKeyAppIdConstName + "}}:"
View Source
const CacheKeyOfAsyncTask = "asyncTask:"
View Source
const CacheKeyOfAsyncTaskId = "id_{{." + CacheKeyAsyncTaskIdConstName + "}}"
View Source
const CacheKeyOfAuthType = "authType_{{." + CacheKeyAuthTypeConstName + "}}:"
View Source
const CacheKeyOfDepartment = "user_{{." + CacheKeyDepartmentIdConstName + "}}:"
View Source
const CacheKeyOfIssue = "user_{{." + CacheKeyIssueIdConstName + "}}:"
View Source
const CacheKeyOfJsapiTicket = "config_{{." + CacheKeyJsapiTicketConfigType + "}}:"
View Source
const CacheKeyOfLoginName = "login_name_{{." + CacheKeyLoginNameConstName + "}}:"
View Source
const CacheKeyOfOrg = "org_{{." + CacheKeyOrgIdConstName + "}}:"
View Source
const CacheKeyOfOutOrg = "outorg_{{." + CacheKeyOutOrgIdConstName + "}}:"
View Source
const CacheKeyOfOutUser = "outuser_{{." + CacheKeyOutUserIdConstName + "}}:"
View Source
const CacheKeyOfPhone = "phone_{{." + CacheKeyPhoneConstName + "}}:"
View Source
const CacheKeyOfProcess = "process_{{." + CacheKeyProcessIdConstName + "}}:"
View Source
const CacheKeyOfProject = "project_{{." + CacheKeyProjectIdConstName + "}}:"
View Source
const CacheKeyOfRole = "role_{{." + CacheKeyRoleIdConstName + "}}:"
View Source
const CacheKeyOfRoleGroup = "group_{{." + CacheKeyRoleGroupConstName + "}}"
View Source
const CacheKeyOfSchedule = CacheKeyPrefix + "schedule:"
View Source
const CacheKeyOfSourceChannel = "source_channel_{{." + CacheKeySourceChannelConstName + "}}:"
View Source
const CacheKeyOfSys = "sys:"
View Source
const CacheKeyOfUser = "user_{{." + CacheKeyUserIdConstName + "}}:"
View Source
const CacheKeyPrefix = "polaris:"
View Source
const (
	CopyIssueWorkHour = "copyIssueWorkHour"
)
View Source
const (
	DataTypeCascader = "cascader"
)
View Source
const DefaultAvatar = "https://polaris-hd2.oss-cn-shanghai.aliyuncs.com/front_resources/picture.svg"
View Source
const DefaultSelectFontColor = "#3c4152"
View Source
const (
	DingAuthError = "invalidAuthInfo"
)
View Source
const FsDocumentDomain = "https://feishu.cn"

飞书文档地址前缀

View Source
const FsDocumentTypeBiTable = "bitable"
View Source
const FsDocumentTypeDoc = "doc"

飞书文档类型

View Source
const FsDocumentTypeDocx = "docx"
View Source
const FsDocumentTypeFile = "file"
View Source
const FsDocumentTypeMindNote = "mindnote"
View Source
const FsDocumentTypeSheet = "sheet"
View Source
const FsDocumentTypeSlide = "slide"
View Source
const FsEventAddIssueAttachment = "addIssueAttachment" //任务新附件
View Source
const FsEventAddProjectMember = "addProjectMember" //添加项目成员
View Source
const FsEventCreateIssueComment = "createIssueComment" //任务新评论
View Source
const FsEventCreateProjectObjectType = "createProjectObjectType" //新建任务栏
View Source
const FsEventDeleteIssue = "deleteIssue" //删除任务
View Source
const FsEventDeleteProjectMember = "deleteProjectMember" //移除项目成员
View Source
const FsEventDeleteProjectObjectType = "deleteProjectObjectType" //删除任务栏
View Source
const FsEventMoveIssue = "moveIssue" //移动任务
View Source
const FsEventUpdateIssueFollower = "updateIssueFollower" //修改关注人
View Source
const FsEventUpdateIssueName = "updateIssueName" //重命名任务
View Source
const FsEventUpdateIssueOwner = "updateIssueOwner" //修改负责人
View Source
const FsEventUpdateIssuePlanEndTime = "updateIssuePlanEndTime" //更新截止时间
View Source
const FsEventUpdateIssuePlanStartTime = "updateIssuePlanStartTime" //更新开始时间
View Source
const FsEventUpdateIssueRemark = "updateIssueRemark" //更新任务描述
View Source
const FsEventUpdateIssueStatus = "updateIssueStatus" //更新任务状态
View Source
const FsEventUpdateProjectName = "updateProjectName" //重命名项目

飞书捷径事件类型

View Source
const FsEventUpdateProjectObjectTypeName = "updateProjectObjectTypeName" //重命名任务栏
View Source
const FsEventUpdateProjectOwner = "updateProjectOwner" //修改项目负责人
View Source
const FsEventUpdateProjectRemark = "updateProjectRemark" //修改项目描述
View Source
const FsShortcutPushUrl = "https://www.feishu.cn/flow/api/subscriber/ptleyJMdX8DJXlD1"

飞书捷径推送地址 const FsShortcutPushUrl = "https://www.feishu.cn/flow/api/subscriber/ptllbvEXgP7QX9Lp"

View Source
const FsShortcutSubscribe = 1

飞书捷径trigger订阅

View Source
const FsShortcutUnsubscribe = 2

飞书捷径trigger退订

View Source
const FsTriggerCreateIssue = "createIssue"

飞书捷径triggerId

View Source
const FsTriggerDoProjectObjectType = "doProjectObjectType"
View Source
const FsTriggerFinishIssue = "finishIssue"
View Source
const FsTriggerUpdateIssue = "updateIssue"
View Source
const FsTriggerUpdateProject = "updateProject"
View Source
const FsUserStatusNotActiveLicense = "no_active_license"
View Source
const FsUserStatusNotInScope = "not_in_scope"
View Source
const FsUserStatusValid = "valid"
View Source
const FunctionAdvancedFilter = "FunctionAdvancedFilter"

高级筛选

View Source
const FunctionAgile = "FunctionAgile"

敏捷迭代数限制

View Source
const FunctionArchiveProjectObjectType = "FunctionArchiveProjectObjectType"

归档任务栏

View Source
const FunctionArchiveTask = "FunctionArchiveTask"

归档任务

View Source
const FunctionAttachSizeLimit = "FunctionAttachSizeLimit"

单文件大小

View Source
const FunctionCalendar = "FunctionCalendar"

日历管理

View Source
const FunctionCustomField = "FunctionCustomField"

自定义字段

View Source
const FunctionCustomFilter = "FunctionCustomFilter"

自定义筛选

View Source
const FunctionCustomView = "FunctionCustomView"

自定义视图

View Source
const FunctionFileManage = "FunctionFileManage"

文件管理

View Source
const FunctionGanttChart = "FunctionGanttChart"

甘特图

View Source
const FunctionProjectCreate = "FunctionProjectCreate"

项目数限制

View Source
const FunctionRecycleBin = "FunctionRecycleBin"

回收站

View Source
const FunctionStatistic = "FunctionStatistic"

统计功能

View Source
const FunctionTaskForm = "FunctionTaskForm"

任务表格

View Source
const FunctionTaskLimit = "FunctionTaskLimit"

任务数限制

View Source
const FunctionTestManage = "FunctionTestManage"

测试管理

View Source
const FunctionVersionManage = "FunctionVersionManage"

版本管理

View Source
const (
	IncludeAdmin = 1
)
View Source
const JaegerContextSpanKey = "JaegerContextSpanKey"
View Source
const JaegerContextTraceKey = "JaegerContextTraceKey"
View Source
const KeyCurrentUser = "U_${current_user}"
View Source
const (
	LangEnglish = "en"
)
View Source
const LinuxGOOS = "linux"

linux操作系统

View Source
const MQTTDefaultKeyTTLOneDay = 86400

mqtt默认key ttl(单位:秒)

View Source
const MQTTDefaultPermissions = "r"

mqtt默认权限

View Source
const MQTTDefaultRootPermissions = "rwlsp"

mqtt默认全局权限

View Source
const MQTTDefaultTTL = 0

mqtt默认ttl(单位:秒)

View Source
const (
	ManageGroupLangCodeSysAdmin = "ManageGroup.Sys"
)
View Source
const (
	// MaxTowTableColumns 两个表相乘的数量要小于5万,要不就不拿数据了
	MaxTowTableColumns = 50000
)
View Source
const NoProjectPreCode = "NPC"

无分配项目的任务编号前缀

View Source
const (
	//JSON
	OssCallbackBodyTypeApplicationJson = "application/json"
)

oss callback 请求类型

View Source
const (
	//ProjectObjectTypeIteration = 1
	ProjectObjectTypeTask = 2
)

项目对象类型ObjectType

View Source
const RecycleVersion = "recyle_version"

回收站版本id

View Source
const (
	// 验证码发送冷却时间,1分钟
	SMSLoginCodeFreezeTime = 1
)

SMS缓存时长

View Source
const (
	ShowTrendsEmptyTime = "未设置"
)
View Source
const TemplateDirPrefix = "resources/template/"
View Source
const TraceServiceName = "PolarisTrace"

TraceName

View Source
const (
	TrendsIssueExt = "{\"issueType\":\"T\"}"
)
View Source
const (
	TrendsRelationTypeApplyJoinOrg = "ApplyJoinOrg"
)

组织动态事件

View Source
const (
	TrendsRelationTypeUser = "User"
)
View Source
const (
	// 企微订单状态
	WeiXinOrderStatusPaySuccess = 1
)

企微订单状态

Variables

View Source
var (
	// 建议仅用于查询**项目的成员**查询,不可用于任务的成员查询。
	MemberRelationTypeList = []int{IssueRelationTypeOwner, IssueRelationTypeParticipant}

	// 任务的参与人,包含:负责人、关注人、确认人
	IssueParticipantTypeList = []int{IssueRelationTypeOwner, IssueRelationTypeFollower, IssueRelationTypeAuditor}
)
View Source
var (
	// 任务、项目优先级名称多语言版本
	LANG_PRIORITIES_MAP = map[string]map[string]string{
		"en": {
			"Priority.Project.P0": "important",
			"Priority.Project.P1": "normal",
			"Priority.Project.P2": "lowest",
			"Priority.Issue.P0":   "highest",
			"Priority.Issue.P1":   "higher",
			"Priority.Issue.P2":   "normal",
			"Priority.Issue.P3":   "lower",
			"Priority.Issue.P4":   "lowest",
		},
	}
	LANG_PRIORITIES_NAME_MAP = map[string]map[string]string{
		"en": {
			"最高": "highest",
			"较高": "higher",
			"普通": "normal",
			"较低": "lower",
			"最低": "lowest",
		},
	}
	LANG_STATUS_MAP = map[string]map[string]string{
		"en": {
			"未开始": "Pending",
			"进行中": "In Progress",

			"待处理":  "Todo",
			"设计中":  "Designing",
			"研发中":  "Developing",
			"测试中":  "Testing",
			"已发布":  "Published",
			"已关闭":  "Closed",
			"已确认":  "Confirmed",
			"修复中":  "Repairing",
			"复测通过": "Passed",
			"已解决":  "Resolved",
			"未完成":  "Incomplete",
			"已完成":  "Completed",
			"待确认":  "Unconfirmed",
		},
	}
	LANG_ISSUE_SRC_MAP = map[string]map[string]string{
		"en": {
			"市场需求": "Market",
			"活动需求": "Activity",
			"客户":   "Customer",
			"老板":   "Boss",
			"产品经理": "PM",
			"其他":   "Other",
		},
	}
	LANG_ISSUE_TYPE_MAP = map[string]map[string]string{
		"en": {

			"新功能":  "New Func",
			"需求优化": "Demand Improve",
			"交互优化": "Interaction Improve",
			"视觉优化": "Visual Improve",
			"其他":   "Other",

			"功能问题":  "Function problem",
			"性能问题":  "Performance problem",
			"接口问题":  "The interface problem",
			"界面问题":  "The vision problem",
			"兼容问题":  "Compatibility problem",
			"易用性问题": "Usability issues",
			"逻辑问题":  "Logical problem",
			"需求问题":  "Demand",
			"不确定":   "Other",
		},
	}
	LANG_ISSUE_PROPERTY_MAP = map[string]map[string]string{
		"en": {
			"建议": "Advice",
			"一般": "General",
			"严重": "Severity",
			"致命": "Deadly",
		},
	}
	LANG_PROJECT_STATUS_MAP = map[string]map[string]string{
		"en": {
			"进行中": "In Progress",
			"已完成": "Completed",
		},
	}
	LANG_ISSUE_STAT_DESC_MAP = map[string]map[string]string{
		"en": {
			"待处理": "Todo",
			"未完成": "Incomplete",
			"进行中": "In Progress",
			"已完成": "Completed",
			"已逾期": "Overdue",

			"设计中": "Designing",
			"研发中": "Developing",
			"测试中": "Testing",
			"已发布": "Published",
			"已关闭": "Closed",

			"未逾期":  "Not Overdue",
			"未开始":  "Pending",
			"已确认":  "Confirmed",
			"修复中":  "Repairing",
			"复测通过": "Passed",
			"已解决":  "Resolved",
			"待确认":  "Unconfirmed",
		},
	}
	LANG_ROLE_NAME_MAP = map[string]map[string]string{
		"en": {
			"组织超级管理员": "Super Admin",
			"组织管理员":   "Admin",
			"组织成员":    "Member",
		},
	}
	LANG_PRO_ROLE_NAME_MAP = map[string]map[string]string{
		"en": {
			"负责人":  "Admin",
			"项目成员": "Project Member",
		},
	}
	LANG_PRO_ITER_NAME_MAP = map[string]map[string]string{
		"en": {
			"未规划": "Not planning",
		},
	}
	LANG_ISSUE_IMPORT_TITLE_MAP = map[string]map[string]string{
		"en": {
			"任务栏":    "Section",
			"任务栏名称":  "Section",
			"任务标题":   "Task Title",
			"标题":     "Task Title",
			"*标题":    "*Task Title",
			"*任务栏名称": "*Section",
			"*任务标题":  "*Task Title",
			"负责人":    "Assignee",
			"父子类型":   "Superior or sub",
			"优先级":    "Priority",
			"任务状态":   "Task Status",
			"任务描述":   "Task Description",
			"开始时间":   "Start Date",
			"截止时间":   "Due Date",
			"标签":     "Tags",
			"关注人":    "Collaborators",
			"确认人":    "Auditor",
			"任务创建时间": "Creation Date",
			"任务创建者":  "Creator",
			"编号ID":   "ID Number",
			"编号":     "ID Number",
			"实际完成时间": "Completed Date",
			"迭代":     "Iteration",

			"任务类型":  "Task Type",
			"*任务类型": "*Task Type",
			"需求类型":  "Demand Type",
			"需求来源":  "Demand Source",
			"缺陷类型":  "Bug Type",
			"严重程度":  "Severity Degree",

			"需求/缺陷类型":   "Demand/Bug Type",
			"需求来源/严重程度": "Demand Source/Severity Degree",

			"重名部门/成员": "Duplicate departments/members",
			"类型":      "Type",
			"所处部门":    "Department of affiliation",
			"部门/成员ID": "Departments/members ID",
			"建议导入样式":  "Recommended import styles",
			"用户":      "User",
			"部门":      "Department",
		},
	}
	LANG_ISSUE_OTHER_MAP = map[string]map[string]string{
		"en": {
			"子任务": "Sub Task",
			"父任务": "Superior Task",
		},
	}
	// 敏捷项目,任务类型(需求、任务、缺陷)的映射
	LANG_ISSUE_OBJECT_TYPE_MAP = map[string]map[string]string{
		"en": {
			"需求": "Demand",
			"任务": "Task",
			"缺陷": "Bug",
		},
	}
	// 用户自定义字段,预定义的系统字段多语言映射
	LANG_CUSTOMER_SYS_FIELD_MAP = map[string]map[string]string{
		"en": {
			"进度": "Progress",
			"评分": "Score",
		},
	}
	LANG_IMPORT_ERR_MAP = map[string]map[string]string{
		"en": {
			"任务统计":  "task_statistics",
			"统计":    "statistics",
			"全部工作项": "all_work_items",
			"父任务":   "Superior Task",
			"子任务":   "Sub Task",

			" 第%d行,第%d列错误:%s":                " Row %d, Col %d error: %s",
			ImportUserErrOfEndTimeLessErr:    "Plan end time must greater than plan start time! ",
			ImportUserErrOfStartTimeStyleErr: "Plan end/start time style error. ",
			ImportIssueErrOfEmail:            "Email style error",
			ImportIssueErrOfLink:             "Link style error",
			ImportIssueErrOfPhone:            "Phone number style error",
			ImportIssueErrOfIssueType:        "Task type error",
			ImportIssueErrOfDateTime:         "Date or time style error",
		},
	}
)
View Source
var (
	// 应用类型,1:表单,2:仪表盘,3:文件夹,4:项目, 5: 汇总表
	// 表单类型为 1
	LcAppTypeForForm   = 1
	LcAppTypeForFolder = 3
	// 创建极星的项目,对应到无码中是一个应用,该应用的类型是 4。
	LcAppTypeForPolaris = 4
	// 汇总表 5
	LcAppTypeForSummaryTable = 5
	// 视图镜像
	LcAppTypeForViewMirror = 6

	// 创建组织时,创建默认示例项目,任务栏单选选项的 id 值设定
	DefaultProjectTaskBarIds = map[int]int64{
		0: 1,
		1: 2,
		2: 3,
		3: 4,
		4: 5,
	}

	// 特殊处理:新项目类型,任务栏不会再出现
	// Common2022 指代"新项目类型"
	HiddenColumnNamesForCommon2022Type = []string{
		BasicFieldProjectObjectTypeId,
		BasicFieldIterationId,
		BasicFieldAuditorIds,
		BasicFieldProjectId,
		BasicFieldParentId,
	}

	HiddenColumnNameForCommon = []string{
		BasicFieldIterationId,
		BasicFieldProjectId,
		BasicFieldParentId,
	}

	HiddenColumnNameForAgileId = []string{
		BasicFieldProjectObjectTypeId,
		BasicFieldProjectId,
		BasicFieldAuditorIds,
		BasicFieldParentId,
	}

	HiddenColumnNameForEmpty = []string{
		BasicFieldCode,
		BasicFieldProjectId,
		BasicFieldIterationId,
		BasicFieldParentId,
		BasicFieldRemark,
		BasicFieldOwnerId,
		BasicFieldProjectObjectTypeId,
		BasicFieldIssueStatus,
		BasicFieldPlanStartTime,
		BasicFieldPlanEndTime,
		BasicFieldFollowerIds,
		BasicFieldAuditorIds,
	}

	IssueChatTitlePrefix      = "[任务讨论] "
	IssueChatTitleNoNameTitle = "未命名任务"
)

和无码交互的一些常量/变量值

View Source
var (
	// 应用对应的权限组
	LcAppPermissionGroupOpsReadJson  = `` /* 319-byte string literal not displayed */
	LcAppPermissionGroupOpsWriteJson = `` /* 1307-byte string literal not displayed */
	LcAppPermissionGroupOpsAdminJson = `` /* 1406-byte string literal not displayed */

	// 权限组的 langCode 值
	// 包含:查看权限-`-2`,编辑权限-`-3`,管理员-`-4`。详情可以咨询无码系统开发者 @刘千源
	AppPermissionGroupLangCodeForRead  = -2
	AppPermissionGroupLangCodeForWrite = -3
	AppPermissionGroupLangCodeForAdmin = -4

	// 无码自定义字段中,部门类型的字段的值的 type 字段值
	LcCustomFieldDeptType = "D_"
	// 用户类型标识
	LcCustomFieldUserType = "U_"

	// 项目管理员权限组的langCode
	AppProjectPermissionAdmin = "41"
)
View Source
var (
	// 任务状态
	LcIssueStatusMap = map[string]string{
		"todo":     "待处理",
		"doing":    "进行中",
		"finished": "已完成",
	}
	// 任务优先级
	LcIssuePriorityMap = map[string]string{
		"p1": "最低",
		"p2": "较低",
		"p3": "普通",
		"p4": "较高",
		"p5": "最高",
	}
)
View Source
var (
	// 机器人个人推送-这些类型的列发生变化,需要组装详情展示
	FsRobotPersonIssueUpdateContentColumnsForText = []string{
		LcColumnFieldTypeInput, LcColumnFieldTypeTextarea, LcColumnFieldTypeTextarea,
		LcColumnFieldTypeDatepicker, LcColumnFieldTypeSelect, LcColumnFieldTypeMultiSelect, LcColumnFieldTypeGroupSelect,
		LcColumnFieldTypeAmount, LcColumnFieldTypeInputNumber,
		LcColumnFieldTypeMobile, LcColumnFieldTypeEmail, LcColumnFieldTypeLink,
		LcColumnFieldTypeMember, LcColumnFieldTypeDept,
	}
	// 附件、图片等
	FsRobotPersonIssueUpdateContentColumnsForFile = []string{
		LcColumnFieldTypeDocument, LcColumnFieldTypeImage,
	}
	// 前后置、关联
	FsRobotPersonIssueUpdateContentColumnsForRelate = []string{
		LcColumnFieldTypeBaRelating, LcColumnFieldTypeRelating,
	}
)
View Source
var AllTranslate = map[string]map[string]string{}
View Source
var BasicFieldsMap = map[string]string{
	BasicFieldIterationId:   TcIterationId,
	BasicFieldPlanStartTime: TcPlanStartTime,
	BasicFieldPlanEndTime:   TcPlanEndTime,
	BasicFieldRemark:        TcRemark,
}
View Source
var BlankTimeObject, _ = time.Parse(AppTimeFormat, BlankTime)
View Source
var BugPropertyMap = map[string]int64{
	"建议": 1,
	"一般": 2,
	"严重": 3,
	"致命": 4,
}

严重程度

View Source
var BugTypeMap = map[string]int64{
	"功能问题":  1,
	"性能问题":  2,
	"接口问题":  3,
	"界面问题":  4,
	"兼容问题":  5,
	"易用性问题": 6,
	"逻辑问题":  7,
	"需求问题":  8,
	"不确定":   9,
}

缺陷类型

View Source
var (
	CustomFieldTrueOrFalseValMap = map[string]int64{
		"是": 1,
		"否": 2,
	}
)

基础字段

View Source
var DefaultProTypeMap2TableList = map[int64][]ProTable{
	1: []ProTable{{Name: "任务"}},
	2: []ProTable{{Name: "需求"}, {Name: "任务"}, {Name: "缺陷"}},
}

DefaultProTypeMap2TableList 创建项目时,不同项目类型,默认创建的 table list,在这里进行配置: map: {projectTypeId: []ProTable}

View Source
var DefaultWorkHour = map[string]interface{}{
	"planHour":        "0",
	"actualHour":      "0",
	"collaboratorIds": []string{},
}
View Source
var DemandSourceMap = map[string]int64{
	"产品经理": 1,
	"客户":   2,
	"老板":   3,
	"市场需求": 4,
	"活动需求": 5,
	"其它":   6,
}

需求来源

View Source
var DemandTypeMap = map[string]int64{
	"新功能":  1,
	"需求优化": 2,
	"交互优化": 3,
	"视觉优化": 4,
	"其它":   5,
}

需求类型

View Source
var FileTypes = map[string]int{
	"JPG":       FileTypePhoto,
	"JPEG":      FileTypePhoto,
	"JFIF":      FileTypePhoto,
	"JPEG 2000": FileTypePhoto,
	"GIF":       FileTypePhoto,
	"BMP":       FileTypePhoto,
	"PNG":       FileTypePhoto,
	"WEBP":      FileTypePhoto,
	"HDR":       FileTypePhoto,
	"HEIF":      FileTypePhoto,
	"BDP":       FileTypePhoto,
	"SVG":       FileTypePhoto,

	"PPT":  FileTypeDoc,
	"XLS":  FileTypeDoc,
	"XLSX": FileTypeDoc,
	"CSV":  FileTypeDoc,
	"DOCX": FileTypeDoc,
	"DOC":  FileTypeDoc,
	"PSD":  FileTypeDoc,
	"TXT":  FileTypeDoc,
	"PDF":  FileTypeDoc,
	"ZIP":  FileTypeDoc,
	"RAR":  FileTypeDoc,

	"MP4": FileTypeVideo,
	"AVI": FileTypeVideo,
	"MPG": FileTypeVideo,
	"RMV": FileTypeVideo,
	"MOV": FileTypeVideo,

	"MP3": FileTypeMusic,
}
View Source
var FsEventDefine = map[string]string{
	FsEventUpdateProjectName:           "重命名项目",
	FsEventUpdateProjectRemark:         "修改项目描述",
	FsEventUpdateProjectOwner:          "修改项目负责人",
	FsEventAddProjectMember:            "添加项目成员",
	FsEventDeleteProjectMember:         "移除项目成员",
	FsEventCreateProjectObjectType:     "新建任务栏",
	FsEventUpdateProjectObjectTypeName: "重命名任务栏",
	FsEventDeleteProjectObjectType:     "删除任务栏",
	FsEventMoveIssue:                   "移动任务",
	FsEventUpdateIssueName:             "重命名任务",
	FsEventUpdateIssueStatus:           "更新任务状态",
	FsEventUpdateIssueRemark:           "更新任务描述",
	FsEventUpdateIssueOwner:            "修改负责人",
	FsEventUpdateIssueFollower:         "修改关注人",
	FsEventUpdateIssuePlanStartTime:    "更新开始时间",
	FsEventUpdateIssuePlanEndTime:      "更新截止时间",
	FsEventCreateIssueComment:          "任务新评论",
	FsEventAddIssueAttachment:          "任务新附件",
	FsEventDeleteIssue:                 "删除任务",
}
View Source
var ImgTypeMap = map[string]bool{
	"GIF":  true,
	"JPG":  true,
	"JPEG": true,
	"PNG":  true,
	"TIFF": true,
	"WEBP": true,
}

IterationStatusList 迭代状态

View Source
var (
	PayLevelDescMap = map[int]string{
		PayLevelStandard:      "标准版",
		PayLevelEnterprise:    "企业版",
		PayLevelFlagship:      "旗舰版",
		PayLevelPrivateDeploy: "私有化版",

		PayLevelDouble11Activity: "双11旗舰版6.66折",
	}
)
View Source
var (
	ProFormFieldsMap = map[string]string{
		ProBasicFieldName:                "项目名",
		ProBasicFieldAppId:               "应用 id",
		ProBasicFieldProId:               "项目 id",
		ProBasicFieldCode:                "项目 code",
		ProBasicFieldPreCode:             "项目 code 前缀",
		ProBasicFieldOwnerIds:            "项目负责人",
		ProBasicFieldParticipantIds:      "参与人、参与部门",
		ProBasicFieldProTypeId:           "项目类型",
		ProBasicFieldPriorityId:          "优先级",
		ProBasicFieldPlanStartTime:       "开始时间",
		ProBasicFieldPlanEndTime:         "结束时间",
		ProBasicFieldPublicStatus:        "项目的公有私有",
		ProBasicFieldStatus:              "项目状态",
		ProBasicFieldTemplateFlag:        "模板标识",
		ProBasicFieldResource:            "项目资源",
		ProBasicFieldIsFiling:            "是否归档",
		ProBasicFieldRemark:              "项目描述",
		ProBasicFieldNotice:              "项目公告",
		ProBasicFieldIsEnableWorkHours:   "是否启用工时",
		ProBasicFieldOutCalendar:         "外部日历标识",
		ProBasicFieldOutCalendarSettings: "日历设置状态",
		ProBasicFieldOutChat:             "外部群聊",
		ProBasicFieldChatSettings:        "外部群聊设置",
		ProBasicFieldSort:                "项目排序值",
		ProBasicFieldCreator:             "创建人",
		ProBasicFieldUpdator:             "更新人",
		ProBasicFieldCreateTime:          "创建时间",
		ProBasicFieldUpdateTime:          "更新时间",
		ProBasicFieldVersion:             "版本、乐观锁",
		ProBasicFieldIsDelete:            "是否删除",
	}
)

ProjectStatusList 项目状态

View Source
var StatusComplete = status.StatusInfoBo{
	ID:          StatusIdComplete,
	Type:        StatusTypeComplete,
	Name:        StatusNameComplete,
	DisplayName: StatusNameComplete,
	FontStyle:   FontStyleComplete,
	BgStyle:     BgStyleComplete,
	Sort:        3,
}
View Source
var StatusCompleteOfIter = status.StatusInfoBo{
	ID:          StatusIdComplete,
	Type:        StatusTypeComplete,
	Name:        StatusNameComplete,
	DisplayName: StatusNameComplete,
	FontStyle:   "#FFFFFF",
	BgStyle:     "#25B47E",
	Sort:        3,
}
View Source
var StatusNotStart = status.StatusInfoBo{
	ID:          StatusIdNotStart,
	Type:        StatusTypeNotStart,
	Name:        StatusNameNotStart,
	DisplayName: StatusNameNotStart,
	FontStyle:   FontStyleNotStart,
	BgStyle:     BgStyleNotStart,
	Sort:        1,
}
View Source
var StatusNotStartOfIter = status.StatusInfoBo{
	ID:          StatusIdNotStart,
	Type:        StatusTypeNotStart,
	Name:        StatusNameNotStart,
	DisplayName: StatusNameNotStart,
	FontStyle:   "#FFFFFF",
	BgStyle:     "#377AFF",
	Sort:        1,
}

默认的迭代状态对象

View Source
var StatusRunning = status.StatusInfoBo{
	ID:          StatusIdRunning,
	Type:        StatusTypeRunning,
	Name:        StatusNameRunning,
	DisplayName: StatusNameRunning,
	FontStyle:   FontStyleRunning,
	BgStyle:     BgStyleRunning,
	Sort:        2,
}
View Source
var StatusRunningOfIter = status.StatusInfoBo{
	ID:          StatusIdRunning,
	Type:        StatusTypeRunning,
	Name:        StatusNameRunning,
	DisplayName: StatusNameRunning,
	FontStyle:   "#FFFFFF",
	BgStyle:     "#F0A100",
	Sort:        2,
}
View Source
var TrendsOperObjPropertyMap = map[string]string{}

项目动态查询有效的动态类型

Functions

func GetCacheBaseExpire

func GetCacheBaseExpire() int64

func GetCacheBaseUserInfoExpire

func GetCacheBaseUserInfoExpire() int64

func GetDingOrderLevel

func GetDingOrderLevel(itemCode string) int64

func GetFsOrderLevel

func GetFsOrderLevel(pricePlanId string) int64

func GetIterationStatusById

func GetIterationStatusById(statusId int64) *status.StatusInfoBo

func GetPermissionDefaultOperationForPro

func GetPermissionDefaultOperationForPro() map[string]interface{}

GetPermissionDefaultOperationForPro 获取项目“默认角色”的权限项

func GetPermissionForNoProIssue

func GetPermissionForNoProIssue() map[string]interface{}

对于无项目(未分配项目)的任务,其参与者具有更改任务的权限

func GetPermissionForOrg

func GetPermissionForOrg() map[string]interface{}

GetPermissionForOrg 获取管理组织的权限组以及对应的操作项,其中包含了**所有**的权限项 这是转换后,提供给前端使用的。

func GetPermissionForPro

func GetPermissionForPro() map[string]interface{}

GetPermissionForPro 获取**项目**所有的权限操作组以及操作项。一般是超管、普通管理员、应用的管理员具备

func GetProjectStatusById

func GetProjectStatusById(statusId int64) *status.StatusInfoBo

func GetStatusIdsByCategory

func GetStatusIdsByCategory(orgId int64, category int, statysType int) ([]int64, errs.SystemErrorInfo)

GetStatusIdsByCategory 根据 category 和 typ 获取对应的状态 ids 任务状态改造后,这个方法不再适用于查询任务的状态,请使用 GetIssueStatusWithTypeGroupByTableId 函数(全局搜)

func GetTabCharacter

func GetTabCharacter(str string) string

func GetUrgeMsgOptions

func GetUrgeMsgOptions() []string

func GetWeiXinOrderLevel

func GetWeiXinOrderLevel(editionId string) int64

func IssueChatTitle

func IssueChatTitle(title string) string

Types

type IssueNoticePushType

type IssueNoticePushType int32
const (
	// 创建任务
	PushTypeCreateIssue IssueNoticePushType = 0
	// 更新任务
	PushTypeUpdateIssue IssueNoticePushType = 1
	// 更新任务状态
	PushTypeUpdateIssueStatus IssueNoticePushType = 2
	// 删除任务
	PushTypeDeleteIssue IssueNoticePushType = 3
	// 更新任务成员
	//PushTypeUpdateIssueMembers IssueNoticePushType = 4
	// 更新任务关联
	//PushTypeUpdateRelationIssue IssueNoticePushType = 5
	// 每日项目日报推送- 通知项目推送
	PushTypeDailyProjectReportNoticProject IssueNoticePushType = 6
	// 每日项目日报推送- 通知消息服务
	PushTypeDailyProjectReportNoticMsg IssueNoticePushType = 7
	// 任务提醒
	PushTypeIssueRemind IssueNoticePushType = 8
	// 任务评论
	PushTypeIssueComment IssueNoticePushType = 9
	// 上传附件
	PushTypeUploadResource IssueNoticePushType = 10
	// 移动任务栏
	//PushTypeUpdateIssueProjectObjectType IssueNoticePushType = 11
	// 删除附件
	PushTypeDeleteResource IssueNoticePushType = 12
	// 任务描述通知
	PushTypeIssueRemarkRemind = 13
	// 任务日报推送
	PushTypeDailyIssueReport = 14
	// 迭代燃尽图
	PushTypeIterationBurnDownChart = 15
	// 项目燃尽图
	PushTypeProjectBurnDownChart = 16
	// 飞书新版提示进入方式
	PushTypeFeishuEntrance = 17
	// 新增任务标签
	PushTypeAddIssueTag = 18
	// 删除任务标签
	PushTypeDeleteIssueTag = 19
	// 恢复任务
	PushTypeRecoverIssue = 20
	// 第三方订单推送
	PushTypeThirdOrder = 21
	// 归档任务
	PushTypeArchiveIssue IssueNoticePushType = 21
	// 任务取消归档
	PushTypeCancelArchiveIssue IssueNoticePushType = 22
	// 引用附件
	PushTypeReferResource IssueNoticePushType = 22
	// 删除引用附件
	PushTypeDeleteReferResource IssueNoticePushType = 23
	// 新增工时
	PushTypeCreateWorkHour IssueNoticePushType = 24
	// 编辑工时
	PushTypeUpdateWorkHour IssueNoticePushType = 25
	// 删除工时
	PushTypeDeleteWorkHour IssueNoticePushType = 26
	// 更新前置任务
	PushTypeUpdateBeforeIssue IssueNoticePushType = 27
	// 更新后置任务
	PushTypeUpdateAfterIssue IssueNoticePushType = 28
	// 撤回任务
	PushTypeWithdrawIssue IssueNoticePushType = 29
	// 审核任务
	PushTypeAuditIssue IssueNoticePushType = 30
	// 任务发起群聊讨论
	PushTypeIssueStartChat IssueNoticePushType = 31
	// 移动项目表格
	PushTypeUpdateIssueProjectTable IssueNoticePushType = 32
	// 变更父任务
	PushTypeUpdateIssueParent IssueNoticePushType = 33

	// 接收飞书回调,处理失败的信息记录
	PushTypeFsCallbackHandleFailed IssueNoticePushType = 100
)

任务动态推送类型

const (
	PushTypeCreateProject            IssueNoticePushType = 1000
	PushTypeUpdateProject            IssueNoticePushType = 1001
	PushTypeUpdateProjectMembers     IssueNoticePushType = 1002
	PushTypeStarProject              IssueNoticePushType = 1003
	PushTypeUnstarProject            IssueNoticePushType = 1004
	PushTypeUnbindProject            IssueNoticePushType = 1005
	PushTypeUpdateProjectStatus      IssueNoticePushType = 1006
	PushTypeCreateIssueBatch         IssueNoticePushType = 1007
	PushTypeCreateProjectFile        IssueNoticePushType = 1008
	PushTypeUpdateProjectFile        IssueNoticePushType = 1009
	PushTypeDeleteProjectFile        IssueNoticePushType = 1010
	PushTypeCreateProjectFolder      IssueNoticePushType = 1011
	PushTypeUpdateProjectFolder      IssueNoticePushType = 1012
	PushTypeDeleteProjectFolder      IssueNoticePushType = 1013
	PushTypeDeleteProject            IssueNoticePushType = 1014
	PushTypeUpdateProjectFileFolder  IssueNoticePushType = 1015
	PushTypeRecoverTag               IssueNoticePushType = 1016
	PushTypeRecoverFolder            IssueNoticePushType = 1017
	PushTypeRecoverProjectFile       IssueNoticePushType = 1018
	PushTypeRecoverProjectAttachment IssueNoticePushType = 1019
	PushTypeDeleteProjectTag         IssueNoticePushType = 1020
	PushTypeAddCustomField           IssueNoticePushType = 1021
	PushTypeDeleteCustomField        IssueNoticePushType = 1022
	PushTypeUseCustomField           IssueNoticePushType = 1023
	PushTypeForbidCustomField        IssueNoticePushType = 1024
	PushTypeUpdateCustomField        IssueNoticePushType = 1025
	PushTypeUseOrgCustomField        IssueNoticePushType = 1026
	PushTypeEnableWorkHour           IssueNoticePushType = 1027
	PushTypeDisableWorkHour          IssueNoticePushType = 1028

	PushTypeUpdateFormField IssueNoticePushType = 1029
)

项目动态推送类型

const (
	//申请加入组织
	PushTypeApplyJoinOrg IssueNoticePushType = 2001
	//通过申请
	PushTypeApplicationApproved IssueNoticePushType = 2002
	//提升为管理员
	PushTypePromotionToOrgManager IssueNoticePushType = 2003
)

组织动态推送类型

type ProTable

type ProTable struct {
	Name string `json:"name"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL