package managesdk type ServiceType string const ( ServiceTypePerson ServiceType = "person" ServiceTypeResource ServiceType = "resource" ) const ( DefaultPersonBaseURL = "http://10.0.0.210:30684/mbpms/api" DefaultResourceBaseURL = "http://10.0.0.210:30684/mbrms/api" ) type Config struct { Type ServiceType BaseURL string Timeout int } type Response struct { Success bool `json:"success"` ErrCode int `json:"errCode"` Msg string `json:"msg"` } type IDResponse struct { Success bool `json:"success"` ErrCode int `json:"errCode"` Msg string `json:"msg"` Data string `json:"data"` } type MsgResponse struct { Success bool `json:"success"` ErrCode int `json:"errCode"` Msg string `json:"msg"` } type InfosData[T any] struct { Infos []T `json:"infos"` TotalCount int64 `json:"totalCount"` } type InfosResponse[T any] struct { Success bool `json:"success"` ErrCode int `json:"errCode"` Msg string `json:"msg"` Data InfosData[T] `json:"data"` } type InfoResponse[T any] struct { Success bool `json:"success"` ErrCode int `json:"errCode"` Msg string `json:"msg"` Data T `json:"data"` } type MapResponse struct { Success bool `json:"success"` ErrCode int `json:"errCode"` Msg string `json:"msg"` Data map[string]any `json:"data"` } type VersionResponse struct { Success bool `json:"success"` ErrCode int `json:"errCode"` Msg string `json:"msg"` Data map[string]any `json:"data"` } type BaseQueryParams struct { PageNo int `form:"pageNo"` PageSize int `form:"pageSize"` } type PersonInfo struct { ID string `json:"id"` Name string `json:"name"` UserID string `json:"userId"` ExtendPropertyValues map[string]any `json:"extendProperties"` TenantID string `json:"tenantId"` CreatedTime string `json:"createdTime"` LastUpdatedTime string `json:"lastUpdatedTime"` } type SavePersonParams struct { ID string `json:"id"` Name string `json:"name"` UserID string `json:"userId"` ExtendProperties map[string]any `json:"extendProperties"` TenantID string `json:"tenantId"` OperatorUserName string `json:"operatorUserName"` } type DeletePersonParams struct { ID string `form:"id"` OperatorUserName string `form:"operatorUserName"` } type QueryPersonsParams struct { Name string `form:"name"` UserID string `form:"userId"` ExtendPropertyValues map[string]any `form:"extendPropertyValues"` TenantID string `form:"tenantId"` BaseQueryParams } type GetPersonParams struct { ID string `form:"id"` } type GenderInfo struct { Gender string `json:"gender"` Label string `json:"label"` } type PersonStateInfo struct { State string `json:"state"` Label string `json:"label"` } type ResourceInfo struct { ID string `json:"id"` Name string `json:"name"` Code string `json:"code"` BusinessType string `json:"businessType"` ExtendPropertyValues map[string]any `json:"extendProperties"` TenantID string `json:"tenantId"` CreateUserID string `json:"createUserId"` LastUpdateUserID string `json:"lastUpdateUserId"` CreatedTime string `json:"createdTime"` LastUpdatedTime string `json:"lastUpdatedTime"` } type SaveResourceParams struct { ID string `json:"id"` Name string `json:"name"` Code string `json:"code"` BusinessType string `json:"businessType"` ExtendProperties map[string]any `json:"extendProperties"` TenantID string `json:"tenantId"` CreateUserID string `json:"createUserId"` UpdateUserID string `json:"updateUserId"` OperatorUserName string `json:"operatorUserName"` } type DeleteResourceParams struct { ID string `form:"id"` DeleteUserID string `form:"deleteUserId"` OperatorUserName string `form:"operatorUserName"` } type QueryResourcesParams struct { Name string `form:"name"` BusinessType string `form:"businessType"` ExtendPropertyValues map[string]any `form:"extendPropertyValues"` UserID string `form:"userId"` QueryMode string `form:"queryMode"` CreateUserID string `form:"createUserId"` TenantID string `form:"tenantId"` BaseQueryParams } type GetResourceParams struct { ID string `form:"id"` } type CategoryInfo struct { Category string `json:"category"` ExcludeField []string `json:"excludeField"` } type ResourceStateInfo struct { State string `json:"state"` Label string `json:"label"` } type OperateLogQueryParams struct { Resource string `form:"resource"` Action string `form:"action"` OperatorName string `form:"operatorName"` StartTime string `form:"startTime"` EndTime string `form:"endTime"` TenantID string `form:"tenantId"` BaseQueryParams } type OperateLogInfo struct { ID string `json:"id"` Resource string `json:"resource"` Action string `json:"action"` OperatorName string `json:"operatorName"` Content string `json:"content"` TenantID string `json:"tenantId"` CreatedTime string `json:"createdTime"` }