Documentation ¶
Index ¶
- Constants
- func DispatchState(dispatchState int32, role int8) (result int32, err error)
- func SetDispatchState(dispatchState int32, role, state int8) (result int32, err error)
- type Archive
- type Attachment
- type Business
- type Callback
- type Challenge
- type Challenge3
- type ChallengeParam
- type ChallengeParam3
- type Control
- type Control3
- type Data
- type DeleteGroupParams
- type Event
- type Group
- type Group3
- type Log
- type Pager
- type PublicRefereeGroupParams
- type ResponseControl3
- type ResponseTag3
- type Tag
- type Tag3
- type TagsCache
Constants ¶
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) )
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 )
const ( // ControlTypeInput 文本类型控件 ControlTypeInput = "input" // ControlTypeTextarea 多行文本类型控件 ControlTypeTextarea = "textarea" // ControlTypeLink 链接类型控件 ControlTypeLink = "link" // ControlTypeSelector 选择类型控件 ControlTypeSelector = "selector" // ControlTypeFile 文件类型控件 ControlTypeFile = "file" // ControlPageSize . ControlPageSize = int(1000) )
const ( // EventTypeAdminReply 管理员回复 EventTypeAdminReply = int8(1) // EventTypeAdminNote 管理员备注 EventTypeAdminNote = int8(2) // EventTypeUserReply 用户回复 EventTypeUserReply = int8(3) // EventTypeSystemReply 系统回复 EventTypeSystemReply = int(4) )
Variables ¶
This section is empty.
Functions ¶
func DispatchState ¶
DispatchState get DispatchState
Types ¶
type 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"` }
Archive .
type Attachment ¶
type Attachment struct { ID int32 `gorm:"column:id" json:"id"` Cid int32 `gorm:"column:cid" json:"cid"` Path string `gorm:"column:path" json:"path"` }
Attachment struct
type Business ¶
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"` }
Business struct
type Callback ¶
type Callback struct { ID int32 `gorm:"column:id"` URL string `gorm:"column:url"` Business int8 `gorm:"column:business"` State int8 `gorm:"column:state"` }
Callback struct
type Challenge ¶
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"` }
Challenge struct
func (*Challenge) FromState ¶
func (c *Challenge) FromState()
FromState set State and BusinessState field from DispatchState field
func (*Challenge) GetState ¶
GetState return state of a role from dispatchState field ex. dispatchState=0x3a4b5c6d, role=1 then result is 0x6
type 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"` }
Challenge3 .
type ChallengeParam ¶
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"` }
ChallengeParam appeal param
func (*ChallengeParam) CheckAdd ¶
func (ap *ChallengeParam) CheckAdd() bool
CheckAdd check add challenge by params
func (*ChallengeParam) CheckBusiness ¶
func (ap *ChallengeParam) CheckBusiness() bool
CheckBusiness check challenge business field by params
func (*ChallengeParam) CheckInfo ¶
func (ap *ChallengeParam) CheckInfo() bool
CheckInfo check get challenge info by params
func (*ChallengeParam) CheckList ¶
func (ap *ChallengeParam) CheckList() bool
CheckList check get list challenge by params
type 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"` }
ChallengeParam3 .
func (*ChallengeParam3) CheckBusiness ¶
func (cp3 *ChallengeParam3) CheckBusiness() bool
CheckBusiness .
type Control ¶
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:"-"` }
Control will describe how the tag be acted
type 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"` }
Control3 .
type 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"` }
DeleteGroupParams .
type Event ¶
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"` }
Event struct
type 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"` }
Group appeal group
type 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"` }
Group3 .
type Log ¶
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"` }
Log is the universal tag model, contains any type of tags The Business field and the Round field will from any business definition
type 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"` }
PublicRefereeGroupParams .
type ResponseControl3 ¶
type ResponseControl3 struct { Code int `json:"code"` Message string `json:"message"` TTL int32 `json:"ttl"` Data []*Control3 `json:"data"` }
ResponseControl3 .
type ResponseTag3 ¶
type ResponseTag3 struct { Code int `json:"code"` Message string `json:"message"` TTL int32 `json:"ttl"` Data *Data }
ResponseTag3 .
type Tag ¶
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"` }
Tag is the universal tag model, contains any type of tags The Business field and the Round field will from any business definition
type 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"` }
Tag3 .