ArchiveAuditCargoHour.go 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. package model
  2. import (
  3. xtime "go-common/library/time"
  4. )
  5. // ArchiveAuditCargoHour is table archive_audit_cargo_hour.
  6. type ArchiveAuditCargoHour struct {
  7. ID int64 `json:"id"`
  8. UID int64 `json:"uid"`
  9. StatDate xtime.Time `json:"stat_date"`
  10. ReceiveValue int64 `json:"receive_value"`
  11. AuditValue int64 `json:"audit_value"`
  12. Ctime xtime.Time `json:"ctime"`
  13. Mtime xtime.Time `json:"mtime"`
  14. State int `json:"state"`
  15. }
  16. // CargoDetail is archive audit detail.
  17. type CargoDetail struct {
  18. UID int64 `json:"uid"`
  19. StatDate xtime.Time `json:"stat_date"`
  20. ReceiveValue int64 `json:"receive_value"`
  21. AuditValue int64 `json:"audit_value"`
  22. }
  23. // CargoItem is audit value which is received or done.
  24. type CargoItem struct {
  25. ReceiveValue int64 `json:"auditing"`
  26. AuditValue int64 `json:"audited"`
  27. }
  28. // CargoView is json data compromised contracted with web front.
  29. type CargoView struct {
  30. Date string `json:"date"`
  31. Data map[int]*CargoItem `json:"data"`
  32. }
  33. // CargoViewWrapper is json data for show the archive cargo audit of every auditor.
  34. type CargoViewWrapper struct {
  35. Username string `json:"username"`
  36. *CargoView
  37. }