123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687 |
- package model
- import (
- "encoding/json"
- "net/url"
- "strconv"
- )
- const (
- _subtitleReportTagReasonID = 5
- )
- type WorkFlowTagListResp struct {
- Code int `json:"code"`
- Message string `json:"message"`
- Data []*WorkFlowTag `json:"data"`
- }
- type WorkFlowTag struct {
- Bid int64 `json:"bid"`
- TagID int64 `json:"tag_id"`
- Rid int64 `json:"rid"`
- Name string `json:"name"`
- }
- type CommonResponse struct {
- Code int `json:"code"`
- Message string `json:"message"`
- }
- type WorkFlowAppealAddReq struct {
- Business int64
- LanCode int64
- Rid int64
- SubtitleID int64
- Score int32
- Tid int64
- Oid int64
- Aid int64
- Mid int64
- BusinessTypeID int32
- BusinessTitle string
- BusinessMid int64
- Description string
- Extra *WorkFlowAppealAddExtra
- }
- type WorkFlowAppealAddExtra struct {
- SubtitleStatus int64 `json:"subtitle_status"`
- SubtitleURL string `json:"subtitle_url"`
- ArchiveName string `json:"arcvhive_name"`
- }
- func (w *WorkFlowAppealAddReq) Params() (params url.Values) {
- var (
- err error
- bs []byte
- )
- params = url.Values{}
- params.Set("business", strconv.FormatInt(w.Business, 10))
- params.Set("fid", strconv.FormatInt(w.LanCode, 10))
- params.Set("rid", strconv.FormatInt(w.Rid, 10))
- params.Set("eid", strconv.FormatInt(w.SubtitleID, 10))
- params.Set("score", strconv.Itoa(int(w.Score)))
- params.Set("tid", strconv.FormatInt(w.Tid, 10))
- params.Set("oid", strconv.FormatInt(w.Oid, 10))
- params.Set("aid", strconv.FormatInt(w.Aid, 10))
- params.Set("mid", strconv.FormatInt(w.Mid, 10))
- if w.Tid == _subtitleReportTagReasonID {
- params.Set("description", w.Description)
- }
- params.Set("business_typeid", strconv.Itoa(int(w.BusinessTypeID)))
- params.Set("business_title", w.BusinessTitle)
- params.Set("business_mid", strconv.FormatInt(w.BusinessMid, 10))
- if w.Extra != nil {
- if bs, err = json.Marshal(w.Extra); err == nil {
- params.Set("business_extra", string(bs))
- }
- }
- return
- }
|