oper.go 951 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. package archive
  2. import "fmt"
  3. const (
  4. //OperTypeNoChannel oper type
  5. OperTypeNoChannel = int8(1)
  6. // OperStyleOne 操作展示类型1:[%s]从[%v]设为[%v]
  7. OperStyleOne = int8(1)
  8. // OperStyleTwo 操作展示类型2:[%s]%v:%v
  9. OperStyleTwo = int8(2)
  10. )
  11. var (
  12. //FlowOperType type
  13. FlowOperType = map[int64]int8{
  14. FLowGroupIDChannel: OperTypeNoChannel,
  15. }
  16. _operType = map[int8]string{
  17. OperTypeNoChannel: "频道禁止",
  18. }
  19. )
  20. // Operformat oper format.
  21. func Operformat(tagID int8, old, new interface{}, style int8) (cont string) {
  22. var template string
  23. switch style {
  24. case OperStyleOne:
  25. template = "[%s]从[%v]设为[%v]"
  26. case OperStyleTwo:
  27. template = "[%s]%v:%v"
  28. }
  29. cont = fmt.Sprintf(template, _operType[tagID], old, new)
  30. return
  31. }
  32. //VideoOper 视频审核记录结构
  33. type VideoOper struct {
  34. AID int64
  35. UID int64
  36. VID int64
  37. Status int
  38. Content string
  39. Attribute int32
  40. LastID int64
  41. Remark string
  42. }