Create & Init Project...

This commit is contained in:
2019-04-22 18:49:16 +08:00
commit fc4fa37393
25440 changed files with 4054998 additions and 0 deletions

View File

@@ -0,0 +1,53 @@
package(default_visibility = ["//visibility:public"])
load(
"@io_bazel_rules_go//go:def.bzl",
"go_test",
"go_library",
)
go_test(
name = "go_default_test",
srcs = ["challenge_test.go"],
embed = [":go_default_library"],
rundir = ".",
tags = ["automanaged"],
deps = ["//vendor/github.com/smartystreets/goconvey/convey:go_default_library"],
)
go_library(
name = "go_default_library",
srcs = [
"archive.go",
"attachment.go",
"business.go",
"callback.go",
"challenge.go",
"control.go",
"event.go",
"group.go",
"log.go",
"tag.go",
],
importpath = "go-common/app/service/main/workflow/model",
tags = ["automanaged"],
deps = ["//library/time:go_default_library"],
)
filegroup(
name = "package-srcs",
srcs = glob(["**"]),
tags = ["automanaged"],
visibility = ["//visibility:private"],
)
filegroup(
name = "all-srcs",
srcs = [
":package-srcs",
"//app/service/main/workflow/model/account:all-srcs",
"//app/service/main/workflow/model/sobot:all-srcs",
],
tags = ["automanaged"],
visibility = ["//visibility:public"],
)

View File

@@ -0,0 +1,28 @@
package(default_visibility = ["//visibility:public"])
load(
"@io_bazel_rules_go//go:def.bzl",
"go_library",
)
go_library(
name = "go_default_library",
srcs = ["user.go"],
importpath = "go-common/app/service/main/workflow/model/account",
tags = ["automanaged"],
visibility = ["//visibility:public"],
)
filegroup(
name = "package-srcs",
srcs = glob(["**"]),
tags = ["automanaged"],
visibility = ["//visibility:private"],
)
filegroup(
name = "all-srcs",
srcs = [":package-srcs"],
tags = ["automanaged"],
visibility = ["//visibility:public"],
)

View File

@@ -0,0 +1,21 @@
package account
// User for sobot userinfo
type User struct {
Mid int64 `json:"mid"`
UName string `json:"uname"`
Tel string `json:"tel"`
EMail string `json:"email"`
Status int32 `json:"status"`
Formal int32 `json:"formal"`
Moral int32 `json:"moral"`
Level int32 `json:"level"`
Exp string `json:"exp"`
Coin float64 `json:"coin"`
BCoin float64 `json:"bcoin"`
Medal string `json:"medal"`
Up map[string]interface{} `json:"up"`
// extra field for further buseinss
Extra map[string]interface{} `json:"extra"`
}

View File

@@ -0,0 +1,15 @@
package model
// Archive .
type Archive struct {
ID int64 `json:"id" gorm:"column:id"`
MID int64 `json:"mid" gorm:"column:mid"`
TypeID int32 `json:"typeid" gorm:"column:typeid"`
Title string `json:"title" gorm:"column:title"`
Content string `json:"content" gorm:"column:content"`
}
// TableName .
func (a *Archive) TableName() string {
return "archive"
}

View File

@@ -0,0 +1,13 @@
package model
// Attachment struct
type Attachment struct {
ID int32 `gorm:"column:id" json:"id"`
Cid int32 `gorm:"column:cid" json:"cid"`
Path string `gorm:"column:path" json:"path"`
}
// TableName by Attachment
func (*Attachment) TableName() string {
return "workflow_attachment"
}

View File

@@ -0,0 +1,35 @@
package model
const (
// BusinessArchiveComplain 稿件投诉
BusinessArchiveComplain = int8(1)
// BusinessArchiveAppeal 稿件申诉
BusinessArchiveAppeal = int8(2)
// BusinessBlackedAppeal 小黑屋申诉
BusinessBlackedAppeal = int8(5)
// BusinessAudit 稿件审核
BusinessAudit = int8(6)
// Disbaled 禁用
Disbaled = int8(0)
// Enabled 启用
Enabled = int8(1)
)
// Business struct
type Business struct {
ID int32 `gorm:"column:id" json:"id"`
Cid int32 `gorm:"column:cid" json:"cid"`
Oid int64 `gorm:"column:oid" json:"oid"`
Business int8 `gorm:"column:business" json:"business"`
Typeid int16 `gorm:"column:typeid" json:"business_typeid"`
Mid int64 `gorm:"column:mid" json:"business_mid"`
Title string `gorm:"column:title" json:"business_title"`
Content string `gorm:"column:content" json:"business_content"`
Extra string `gorm:"column:extra" json:"business_extra"`
}
// TableName by business
func (*Business) TableName() string {
return "workflow_business"
}

View File

@@ -0,0 +1,14 @@
package model
// Callback struct
type Callback struct {
ID int32 `gorm:"column:id"`
URL string `gorm:"column:url"`
Business int8 `gorm:"column:business"`
State int8 `gorm:"column:state"`
}
// TableName by Callback
func (*Callback) TableName() string {
return "workflow_callback"
}

View File

@@ -0,0 +1,216 @@
package model
import (
"errors"
"go-common/library/time"
)
const (
// AuditRole 审核
AuditRole = int8(0)
// CustomerServiceRole 客服
CustomerServiceRole = int8(1)
// StateUntreated .
StateUntreated = int8(0)
// StatePassed .
StatePassed = int8(1)
// StateReject .
StateReject = int8(2)
// StateClose .
StateClose = int8(3)
// DispatchStateAuditMask 1111
DispatchStateAuditMask = int32(0xf)
// DispatchStateCustomerServiceMask 11110000
DispatchStateCustomerServiceMask = int32(0xf0)
// QueueState 队列中审核状态
QueueState = 15
// QueueBusinessState 队列中客服状态
QueueBusinessState = 15
// QueueStateBefore 默认审核状态
QueueStateBefore = 0
// QueueBusinessStateBefore 默认客服状态
QueueBusinessStateBefore = 1
)
// Challenge struct
type Challenge struct {
ID int32 `gorm:"column:id" json:"id"`
Tid int32 `gorm:"column:tid" json:"tid"`
Gid int32 `gorm:"column:gid" json:"gid"`
Oid int64 `gorm:"column:oid" json:"oid"`
Mid int64 `gorm:"column:mid" json:"mid"`
Eid int64 `gorm:"column:eid" json:"eid"`
State int8 `gorm:"-" json:"state"`
Business int8 `gorm:"column:business" json:"business"`
BusinessState int8 `gorm:"-" json:"business_state"`
Assignee int32 `gorm:"column:assignee_adminid" json:"assignee_adminid"`
Adminid int32 `gorm:"column:adminid" json:"adminid"`
MetaData string `gorm:"column:metadata" json:"metadata"`
Desc string `gorm:"column:description" json:"description"`
Attachments []*Attachment `gorm:"-" json:"attachments"`
Events []*Event `gorm:"-" json:"events"`
Ctime time.Time `gorm:"ctime" json:"ctime"`
Mtime time.Time `gorm:"mtime" json:"mtime"`
DispatchState uint32 `gorm:"dispatch_state"`
BusinessInfo Business `gorm:"-" json:"business_info"`
}
// ChallengeParam appeal param
type ChallengeParam struct {
ID int32 `form:"id"`
Tid int32 `form:"tid"`
Oid int64 `form:"oid"`
Mid int64 `form:"mid"`
Desc string `form:"description"`
AdminID int32 `form:"admin_id"`
AssigneeID int32 `form:"assignee_id"`
AttachmentsStr string `form:"attachments"`
Attachments []string `form:"attachments[]"`
Business int8 `form:"business"`
BusinessState int8 `form:"business_state"`
MetaData string `form:"metadata"`
BusinessTypeid int32 `form:"business_typeid"`
BusinessTitle string `form:"business_title"`
BusinessContent string `form:"business_content"`
BusinessMid int64 `form:"business_mid"`
BusinessExtra string `form:"business_extra"`
Role uint8 `form:"role"`
}
// TableName by Challenge
func (*Challenge) TableName() string {
return "workflow_chall"
}
// SetDispatchState set DispatchState
func SetDispatchState(dispatchState int32, role, state int8) (result int32, err error) {
switch role {
case AuditRole:
result = dispatchState&(^DispatchStateAuditMask) + int32(state)
case CustomerServiceRole:
result = dispatchState&(^DispatchStateCustomerServiceMask) + (int32(state) << 4)
default:
err = errors.New("changeDispatchState Unknown Role")
}
return result, err
}
// DispatchState get DispatchState
func DispatchState(dispatchState int32, role int8) (result int32, err error) {
switch role {
case AuditRole:
result = dispatchState & DispatchStateAuditMask
case CustomerServiceRole:
result = (dispatchState & DispatchStateCustomerServiceMask) >> 4
default:
err = errors.New("changeDispatchState Unknown Role")
}
return result, err
}
// SetState update state of a role
// ex. oldState=0x3a4b5c6d, state=15, role=1 then result is 0x3a4b5cfd
func (c *Challenge) SetState(state uint32, role uint8) {
oldState := c.DispatchState
mod := uint32(^(0xf << (4 * role)))
oldState = oldState & mod // all bit keep unchanged and bits you want update change to 0
c.DispatchState = oldState + state<<(4*role)
}
// GetState return state of a role from dispatchState field
// ex. dispatchState=0x3a4b5c6d, role=1 then result is 0x6
func (c *Challenge) GetState(role uint8) (result int8) {
dispatchState := c.DispatchState
mod := uint32(0xf << (4 * role))
dispatchState &= mod
result = int8(dispatchState >> (4 * role))
return
}
// FromState set State and BusinessState field from DispatchState field
func (c *Challenge) FromState() {
c.State = c.GetState(uint8(0))
if c.State == QueueState {
c.State = QueueStateBefore
}
c.BusinessState = c.GetState(uint8(1))
if c.BusinessState == QueueBusinessState {
c.BusinessState = QueueBusinessStateBefore
}
}
// CheckAdd check add challenge by params
func (ap *ChallengeParam) CheckAdd() bool {
return !(ap.Oid == 0 || ap.Mid == 0 || ap.Business == 0 || ap.Tid == 0 || ap.Desc == "")
}
// CheckList check get list challenge by params
func (ap *ChallengeParam) CheckList() bool {
return !(ap.Mid == 0 || ap.Business == 0)
}
// CheckInfo check get challenge info by params
func (ap *ChallengeParam) CheckInfo() bool {
return !(ap.ID == 0 || ap.Mid == 0 || ap.Business == 0)
}
// CheckBusiness check challenge business field by params
func (ap *ChallengeParam) CheckBusiness() bool {
return !(ap.BusinessTypeid == 0 && ap.BusinessMid == 0 && ap.BusinessTitle == "" && ap.BusinessContent == "" && ap.BusinessExtra == "")
}
// ChallengeParam3 .
type ChallengeParam3 struct {
Business int8 `form:"business" validate:"required"`
Fid int64 `form:"fid"`
Rid int64 `form:"rid"`
Eid int64 `form:"eid"`
Score int64 `form:"score"`
Tid int32 `form:"tid"`
Oid int64 `form:"oid" validate:"required"`
Aid int64 `form:"aid"`
Mid int64 `form:"mid"`
Desc string `form:"description"`
AdminID int32 `form:"admin_id"`
AssigneeID int32 `form:"assignee_id"`
Attachments []string `form:"attachments,split"`
BusinessState int8 `form:"business_state"`
MetaData string `form:"metadata"`
BusinessTypeid int16 `form:"business_typeid"`
BusinessTitle string `form:"business_title"`
BusinessContent string `form:"business_content"`
BusinessMid int64 `form:"business_mid"`
BusinessExtra string `form:"business_extra"`
Role uint8 `form:"role"`
}
// CheckBusiness .
func (cp3 *ChallengeParam3) CheckBusiness() bool {
return !(cp3.BusinessTypeid == 0 && cp3.BusinessMid == 0 && cp3.BusinessTitle == "" && cp3.BusinessContent == "" && cp3.BusinessExtra == "")
}
// Challenge3 .
type Challenge3 struct {
ID int64 `json:"id" gorm:"column:id"`
Gid int64 `json:"gid" gorm:"column:gid"`
Mid int64 `json:"mid" gorm:"column:mid"`
Tid int64 `json:"tid" gorm:"column:tid"`
Eid int64 `json:"eid" gorm:"column:eid"`
Oid int64 `json:"oid" gorm:"column:oid"`
Business int64 `json:"business" gorm:"column:business"`
Desc string `json:"description" gorm:"column:description"`
MetaData string `json:"metadata" gorm:"column:metadata"`
DispatchState int64 `json:"dispatch_state" gorm:"column:dispatch_state"`
Ctime time.Time `json:"ctime" gorm:"column:ctime"`
Mtime time.Time `json:"mtime" gorm:"column:mtime"`
}
// TableName .
func (*Challenge3) TableName() string {
return "workflow_chall"
}

View File

@@ -0,0 +1,27 @@
package model
import (
"testing"
"github.com/smartystreets/goconvey/convey"
)
func TestDispatchState(t *testing.T) {
convey.Convey("UpState", t, func() {
dispatchState := int32(0x3a4b5c6d)
role := int8(1)
result, _ := DispatchState(dispatchState, role)
convey.So(result, convey.ShouldEqual, uint32(0x6))
})
}
func TestSetDispatchState(t *testing.T) {
convey.Convey("UpState", t, func() {
dispatchState := int32(0x3a4b5c6d)
state := int8(0x1)
role := int8(1)
result, err := SetDispatchState(dispatchState, role, state)
convey.ShouldBeNil(err)
convey.So(result, convey.ShouldEqual, uint32(0x3a4b5c1d))
})
}

View File

@@ -0,0 +1,58 @@
package model
import (
"time"
)
const (
// ControlTypeInput 文本类型控件
ControlTypeInput = "input"
// ControlTypeTextarea 多行文本类型控件
ControlTypeTextarea = "textarea"
// ControlTypeLink 链接类型控件
ControlTypeLink = "link"
// ControlTypeSelector 选择类型控件
ControlTypeSelector = "selector"
// ControlTypeFile 文件类型控件
ControlTypeFile = "file"
// ControlPageSize .
ControlPageSize = int(1000)
)
// Control will describe how the tag be acted
type Control struct {
Cid int32 `gorm:"-" json:"-"`
Tid int32 `gorm:"column:tid" json:"tid"`
Weight int32 `gorm:"-" json:"-"`
Name string `gorm:"column:name" json:"name"`
Title string `gorm:"column:title" json:"title"`
Component string `gorm:"column:component" json:"component"`
Placeholder string `gorm:"column:placeholder" json:"placeholder"`
Required bool `gorm:"column:required" json:"required"`
CTime time.Time `gorm:"-" json:"-"`
MTime time.Time `gorm:"-" json:"-"`
}
// TableName by control
func (*Control) TableName() string {
return "workflow_tag_control"
}
// Control3 .
type Control3 struct {
TID int64 `json:"tid"`
BID int64 `json:"bid"`
Name string `json:"name"`
Title string `json:"title"`
Component string `json:"component"`
Placeholder string `json:"placeholder"`
Required int64 `json:"required"`
}
// ResponseControl3 .
type ResponseControl3 struct {
Code int `json:"code"`
Message string `json:"message"`
TTL int32 `json:"ttl"`
Data []*Control3 `json:"data"`
}

View File

@@ -0,0 +1,33 @@
package model
import (
xtime "go-common/library/time"
)
const (
// EventTypeAdminReply 管理员回复
EventTypeAdminReply = int8(1)
// EventTypeAdminNote 管理员备注
EventTypeAdminNote = int8(2)
// EventTypeUserReply 用户回复
EventTypeUserReply = int8(3)
// EventTypeSystemReply 系统回复
EventTypeSystemReply = int(4)
)
// Event struct
type Event struct {
ID int32 `gorm:"column:id" json:"id"`
Cid int32 `gorm:"column:cid" json:"cid"`
Event int8 `gorm:"column:event" json:"event"`
Adminid int32 `gorm:"column:adminid" json:"adminid"`
Content string `gorm:"column:content" json:"content"`
Attachments string `gorm:"column:attachments" json:"attachments"`
Ctime xtime.Time `gorm:"column:ctime" json:"ctime"`
Mtime xtime.Time `gorm:"column:mtime" json:"mtime"`
}
// TableName by event
func (*Event) TableName() string {
return "workflow_event"
}

View File

@@ -0,0 +1,76 @@
package model
import (
"time"
)
const (
// StateTypePending 处理中
StateTypePending = int8(0)
// StateTypeYes 有效
StateTypeYes = int(1)
// StateTypeNo 无效
StateTypeNo = int(2)
// StateDelete 删除
StateDelete = int(9)
// StatePublicReferee 移交众裁
StatePublicReferee = int(10)
)
// Group appeal group
type Group struct {
ID int32 `gorm:"column:id" json:"id"`
Oid int64 `gorm:"column:oid" json:"oid"`
State int8 `gorm:"column:state" json:"state"`
Business int8 `gorm:"column:business" json:"business"`
Tid int32 `gorm:"column:tid" json:"tid"`
Count int32 `gorm:"column:count" json:"count"`
Handling int32 `gorm:"column:handling" json:"handling"`
Note string `gorm:"column:note" json:"note"`
CTime time.Time `gorm:"column:ctime" json:"ctime"`
MTime time.Time `gorm:"column:mtime" json:"mtime"`
Lasttime time.Time `gorm:"column:lasttime" json:"lasttime"`
}
// TableName by Group
func (*Group) TableName() string {
return "workflow_group"
}
// Group3 .
type Group3 struct {
ID int64 `gorm:"column:id" json:"id"`
Oid int64 `gorm:"column:oid" json:"oid"`
State int64 `gorm:"column:state" json:"state"`
Business int64 `gorm:"column:business" json:"business"`
Fid int64 `gorm:"column:fid" json:"fid"`
Rid int64 `gorm:"column:rid" json:"rid"`
Eid int64 `gorm:"column:eid" json:"eid"`
Score int64 `gorm:"column:score" json:"score"`
Tid int64 `gorm:"column:tid" json:"tid"`
Count int64 `gorm:"column:count" json:"count"`
Handling int64 `gorm:"column:handling" json:"handling"`
Note string `gorm:"column:note" json:"note"`
CTime time.Time `gorm:"column:ctime" json:"ctime"`
MTime time.Time `gorm:"column:mtime" json:"mtime"`
Lasttime time.Time `gorm:"column:lasttime" json:"lasttime"`
}
// TableName .
func (g3 *Group3) TableName() string {
return "workflow_group"
}
// DeleteGroupParams .
type DeleteGroupParams struct {
Business int64 `json:"business" form:"business" validate:"required"`
OID int64 `json:"oid" form:"oid" validate:"required"`
EID int64 `json:"eid" form:"eid"`
}
// PublicRefereeGroupParams .
type PublicRefereeGroupParams struct {
Business int8 `json:"business" form:"business" validate:"required"`
Oid string `json:"oid" form:"oid" validate:"required"`
Eid int64 `json:"eid" form:"eid"`
}

View File

@@ -0,0 +1,24 @@
package model
import (
"time"
)
// Log is the universal tag model, contains any type of tags
// The Business field and the Round field will from any business definition
type Log struct {
AdminID int32 `gorm:"column:adminid"`
Oid int64 `gorm:"column:oid"`
Business int8 `gorm:"column:business"`
Target int32 `gorm:"column:target"`
Module int8 `gorm:"column:module"`
Remark string `gorm:"column:remark"`
Note string `gorm:"column:note"`
CTime time.Time `gorm:"column:ctime"`
MTime time.Time `gorm:"column:mtime"`
}
// TableName Tag tablename
func (*Log) TableName() string {
return "workflow_log"
}

View File

@@ -0,0 +1,31 @@
package(default_visibility = ["//visibility:public"])
load(
"@io_bazel_rules_go//go:def.bzl",
"go_library",
)
go_library(
name = "go_default_library",
srcs = [
"check.go",
"sobot.go",
],
importpath = "go-common/app/service/main/workflow/model/sobot",
tags = ["automanaged"],
visibility = ["//visibility:public"],
)
filegroup(
name = "package-srcs",
srcs = glob(["**"]),
tags = ["automanaged"],
visibility = ["//visibility:private"],
)
filegroup(
name = "all-srcs",
srcs = [":package-srcs"],
tags = ["automanaged"],
visibility = ["//visibility:public"],
)

View File

@@ -0,0 +1,25 @@
package sobot
// Check the TicketParam
func (tp *TicketParam) Check() bool {
if tp.TicketTitle == "" || tp.TicketID == 0 || tp.TicketContent == "" || tp.CustomerEmail == "" {
return false
}
return true
}
// CheckModify the TicketParam modiy
func (tp *TicketParam) CheckModify() bool {
if tp.TicketID == 0 || tp.CustomerEmail == "" {
return false
}
return true
}
// Check the ReplyParam
func (rp *ReplyParam) Check() bool {
if rp.CustomerEmail == "" || rp.ReplyContent == "" || rp.TicketID == 0 {
return false
}
return true
}

View File

@@ -0,0 +1,95 @@
package sobot
const (
// TicketFrom .
TicketFrom = int8(12)
// EcodeOK .
EcodeOK = "000000"
// ReplyTypePublic 评论可见状态
ReplyTypePublic = int8(0)
// ReplyTypeCSOnly .
ReplyTypeCSOnly = int8(1)
// CustomerSourcePC 客户来源
CustomerSourcePC = int8(0)
// CustomerSourceWX .
CustomerSourceWX = int8(1)
// CustomerSourceAPP .
CustomerSourceAPP = int8(2)
// CustomerSourceWB .
CustomerSourceWB = int8(3)
// CustomerSourceWAP .
CustomerSourceWAP = int8(4)
// TicketLevelLow 工单等级 .
TicketLevelLow = int8(0)
// TicketLevelMedium .
TicketLevelMedium = int8(1)
// TicketLevelHigh .
TicketLevelHigh = int8(2)
// TicketLevelurgency .
TicketLevelurgency = int8(3)
// TicketStatusPending 工单状态
TicketStatusPending = int8(0)
// TicketStatusHandling .
TicketStatusHandling = int8(1)
// TicketStatusReplying .
TicketStatusReplying = int8(2)
// TicketStatusSolved .
TicketStatusSolved = int8(3)
// TicketStatusClosed .
TicketStatusClosed = int8(99)
// TicketStatusDeleted .
TicketStatusDeleted = int8(98)
)
// Ticket struct
type Ticket struct {
TicketID string `json:"ticket_id"`
Content string `json:"ticket_content"`
Level int8 `json:"ticket_level"`
State int8 `json:"ticket_status"`
Title string `json:"ticket_title"`
FileStr string `json:"file_str"`
CTime int64 `json:"ctime"`
}
// Reply struct
type Reply struct {
Face string `json:"face_img"`
FileStr string `json:"file_str"`
Content string `json:"reply_content"`
ReplyType int8 `json:"reply_type"`
ShowName string `json:"show_name"`
StartType int8 `json:"start_type"`
CTime int64 `json:"reply_time"`
}
// ReplyParam reply param
type ReplyParam struct {
TicketID int32 `form:"ticket_id" validate:"required"`
ReplyContent string `form:"reply_content" validate:"required"`
CustomerEmail string `form:"customer_email" validate:"required"`
StartType int8 `form:"start_type"`
ReplyType int8 `form:"reply_type"`
}
// TicketParam ticket param
type TicketParam struct {
CustomerName string `form:"customer_name"`
CustomerQQ string `form:"customer_qq"`
CustomerNick string `form:"customer_nick"`
CustomerEmail string `form:"customer_email" validate:"required"`
CustomerSource int8 `form:"customer_source"`
CustomerPhone string `form:"customer_phone"`
TicketID int32 `form:"ticket_id" validate:"required"`
TicketTitle string `form:"ticket_title"`
TicketContent string `form:"ticket_content"`
TicketLevel int8 `form:"ticket_level"`
TicketStatus int8 `form:"ticket_status"`
TicketFrom int8 `form:"ticket_from"`
StartType int8 `form:"start_type"`
FileStr string `form:"file_str"`
}

View File

@@ -0,0 +1,68 @@
package model
import (
"time"
)
// Tag is the universal tag model, contains any type of tags
// The Business field and the Round field will from any business definition
type Tag struct {
Tid int32 `gorm:"column:id" json:"tid"`
Name string `gorm:"column:name" json:"name"`
Business int8 `gorm:"column:business" json:"business"`
Weight int16 `gorm:"column:weight" json:"weight"`
Round int8 `gorm:"column:round" json:"round"`
State int8 `gorm:"column:state" json:"state"`
Remark string `gorm:"column:remark" json:"remark"`
Controls []*Control `gorm:"-" json:"controls"`
CTime time.Time `gorm:"column:ctime" json:"ctime"`
MTime time.Time `gorm:"column:mtime" json:"mtime"`
}
// TableName Tag tablename
func (*Tag) TableName() string {
return "workflow_tag"
}
// TagsCache tag cache
type TagsCache struct {
TagMap map[int8]map[int32]*Tag
TagSlice map[int8][]*Tag
TagMap3 map[int64]map[int64][]*Tag3
TagMap3Tid map[int64]map[int64]*Tag3
}
// ResponseTag3 .
type ResponseTag3 struct {
Code int `json:"code"`
Message string `json:"message"`
TTL int32 `json:"ttl"`
Data *Data
}
// Data .
type Data struct {
Data []*Tag3 `json:"data"`
Pager *Pager `json:"page"`
}
// Tag3 .
type Tag3 struct {
BID int64 `json:"bid"`
TagID int64 `json:"tag_id"`
RID int64 `json:"rid"`
Name string `json:"name"`
Weight int64 `json:"weight"`
State int64 `json:"state"`
Desc string `json:"description"`
Controls []*Control3 `json:"controls"`
Ctime int64 `json:"ctime"`
Mtime int64 `json:"mtime"`
}
// Pager .
type Pager struct {
Num int64 `json:"num"`
Size int64 `json:"size"`
Total int64 `json:"total"`
}