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,43 @@
package model
import (
xtime "go-common/library/time"
)
// ArchiveAuditCargoHour is table archive_audit_cargo_hour.
type ArchiveAuditCargoHour struct {
ID int64 `json:"id"`
UID int64 `json:"uid"`
StatDate xtime.Time `json:"stat_date"`
ReceiveValue int64 `json:"receive_value"`
AuditValue int64 `json:"audit_value"`
Ctime xtime.Time `json:"ctime"`
Mtime xtime.Time `json:"mtime"`
State int `json:"state"`
}
// CargoDetail is archive audit detail.
type CargoDetail struct {
UID int64 `json:"uid"`
StatDate xtime.Time `json:"stat_date"`
ReceiveValue int64 `json:"receive_value"`
AuditValue int64 `json:"audit_value"`
}
// CargoItem is audit value which is received or done.
type CargoItem struct {
ReceiveValue int64 `json:"auditing"`
AuditValue int64 `json:"audited"`
}
// CargoView is json data compromised contracted with web front.
type CargoView struct {
Date string `json:"date"`
Data map[int]*CargoItem `json:"data"`
}
// CargoViewWrapper is json data for show the archive cargo audit of every auditor.
type CargoViewWrapper struct {
Username string `json:"username"`
*CargoView
}

View File

@@ -0,0 +1,169 @@
package model
import (
xtime "go-common/library/time"
)
// ArchiveStat is table archive_stat
type ArchiveStat struct {
ID int64 `json:"id"`
Business int `json:"business"`
StatType int `json:"stat_type"`
TypeID int `json:"typeid"`
GroupID int `json:"group_id"`
UID int64 `json:"uid"`
StatDate xtime.Time `json:"stat_date"`
Content string `json:"content"`
Ctime xtime.Time `json:"ctime"`
Mtime xtime.Time `json:"mtime"`
State int `json:"state"`
StatValue int64 `json:"stat_value"`
}
// StatNode is Minimum dimension stat value.
type StatNode struct {
StatDate xtime.Time `json:"stat_date"`
Business int `json:"business"`
StatType int `json:"stat_type"`
TypeID int `json:"typeid"`
UID int64 `json:"uid"`
StatValue int64 `json:"stat_value"`
}
// CsvMetaNode is
type CsvMetaNode struct {
Index int
Name string
DataCode int
}
// StatItem is element of stat view json model.
type StatItem struct {
DataCode int `json:"data_code"`
Value int64 `json:"value"`
}
// StatView is common stat view json model.
type StatView struct {
Date int64 `json:"date"`
Stats []*StatItem `json:"stats"`
}
// StatItemExt is StatItem extension.
type StatItemExt struct {
Uname string `json:"uname"`
Stats []*StatItem `json:"stat"`
}
// StatViewExt is StatView extension
type StatViewExt struct {
Date int64 `json:"date"`
Wraps []*StatItemExt `json:"stats"`
}
const (
// business字段枚举值
// ArchiveRecheck is 稿件回查项目
ArchiveRecheck = 1
// TagRecheck is 稿件频道tag回查项目
TagRecheck = 2
// RandomVideoAudit is 视频非定时审核操作数据
RandomVideoAudit = 3
// FixedVideoAudit is 视频定时审核操作数据
FixedVideoAudit = 4
// stat_type字段枚举值
// 统计指标枚举值
// TotalArchive is 总稿件量
TotalArchive = 1
// TotalOper is 总操作量
TotalOper = 2
// ReCheck is 打回量
ReCheck = 3
// Lock is 锁定量
Lock = 4
// ThreeLimit is 三限量
ThreeLimit = 5
// FirstCheck is 一查稿件量
FirstCheck = 6
// SecondCheck is 二查稿件量
SecondCheck = 7
// ThirdCheck is 三查稿件量
ThirdCheck = 8
// TotalOperFrequency is 总操作次数
TotalOperFrequency = 9
// FirstCheckOper is 一查次数
FirstCheckOper = 10
// SecondCheckOper is 二查次数
SecondCheckOper = 11
// ThirdCheckOper is 三查次数
ThirdCheckOper = 12
// FirstCheckTime is 一查响应总时间
FirstCheckTime = 13
// SecondCheckTime is 二查响应总时间
SecondCheckTime = 14
// ThirdCheckTime is 三查响应总时间
ThirdCheckTime = 15
// FirstAvgTime is 一查响应平均耗时
FirstAvgTime = 16
// SecondAvgTime is 二查响应平均耗时
SecondAvgTime = 17
// ThirdAvgTime is 三查响应平均耗时
ThirdAvgTime = 18
// NoRankArchive is 排行禁止
NoRankArchive = 19
// NoIndexArchive is 动态禁止
NoIndexArchive = 20
// NoRecommendArchive is 推荐禁止
NoRecommendArchive = 21
// NoPushArchive is 粉丝动态禁止
NoPushArchive = 22
// TagRecheckTotalTime is tag回查总时间
TagRecheckTotalTime = 23
// TagRecheckTotalCount is 频道回查操作总量
TagRecheckTotalCount = 24
// TagChangeCount is tag变更的稿件量
TagChangeCount = 25
// TagRecheckAvgTime is tag保存操作平均耗时
TagRecheckAvgTime = 26
// TotalVideo is 总操视频量
TotalVideo = 27
// TotalVideoOper is 总操作次数
TotalVideoOper = 28
// OpenVideo is 开放浏视频量
OpenVideo = 29
// OpenVideoOper is 开放浏览操作次数
OpenVideoOper = 30
// VipAccessVideo is 会员可视频量
VipAccessVideo = 31
// VipAccessVideoOper is 会员可见操作次数
VipAccessVideoOper = 32
// RejectVideo is 打视频量
RejectVideo = 33
// RejectVideoOper is 打回操作次数
RejectVideoOper = 34
// LockVideo is 锁视频量
LockVideo = 35
// LockVideoOper is 锁定操作次数
LockVideoOper = 36
// PassVideoTotalDuration is 通过视频总时长
PassVideoTotalDuration = 37
// FailVideoTotalDuration is 未通过视频总时长
FailVideoTotalDuration = 38
// WaitAuditAvgTime is 视频提交到进入待审平均响应时间
WaitAuditAvgTime = 39
// WaitAuditDuration is 视频提交到进入待审时间
WaitAuditDuration = 40
// WaitAuditOper is 视频提交到进入待审次数
WaitAuditOper = 41
//valueType
// NumValue is num unit
NumValue = 1
// TimeValue is second unit
TimeValue = 2
)

View File

@@ -0,0 +1,42 @@
package model
import (
xtime "go-common/library/time"
)
// ArchiveStatStream is table archive_stat
type ArchiveStatStream struct {
ID int64 `json:"id"`
Business int `json:"business"`
StatType int `json:"stat_type"`
TypeID int `json:"typeid"`
GroupID int `json:"group_id"`
UID int `json:"uid"`
StatTime xtime.Time `json:"stat_time"`
StatValue int64 `json:"stat_value"`
Ctime xtime.Time `json:"ctime"`
Mtime xtime.Time `json:"mtime"`
State int `json:"state"`
}
const (
// business字段枚举值
// Recheck123 is 稿件123回查移入移出
Recheck123 = 1
// stat_type字段枚举值
// FIRST_RECHECK_IN is 一查移入
FIRST_RECHECK_IN = 1
// FIRST_RECHECK_OUT is 一查移出
FIRST_RECHECK_OUT = 2
// SECOND_RECHECK_IN is 二查移入
SECOND_RECHECK_IN = 3
// SECOND_RECHECK_OUT is 二查移出
SECOND_RECHECK_OUT = 4
// THIRD_RECHECK_IN is 三查移入
THIRD_RECHECK_IN = 5
// THIRD_RECHECK_OUT is 三查移出
THIRD_RECHECK_OUT = 6
)

View File

@@ -0,0 +1,35 @@
package(default_visibility = ["//visibility:public"])
load(
"@io_bazel_rules_go//go:def.bzl",
"go_library",
)
go_library(
name = "go_default_library",
srcs = [
"ArchiveAuditCargoHour.go",
"ArchiveStat.go",
"ArchiveStatStream.go",
"task.go",
"task_log.go",
],
importpath = "go-common/app/admin/main/laser/model",
tags = ["automanaged"],
visibility = ["//visibility:public"],
deps = ["//library/time:go_default_library"],
)
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,38 @@
package model
import (
xtime "go-common/library/time"
)
// Task is Laser application Task
type Task struct {
ID int64 `json:"id"`
AdminID int64 `json:"admin_id"`
Username string `json:"username"`
MID int64 `json:"mid"`
LogDate xtime.Time `json:"log_date"`
ContactEmail string `json:"contact_email"`
SourceType int `json:"source_type"`
Platform int `json:"platform"`
State int `json:"state"`
IsDeleted int `json:"is_deleted"`
CTime xtime.Time `json:"ctime"`
MTime xtime.Time `json:"mtime"`
}
// TaskPager Task pager
type TaskPager struct {
Total int64 `json:"total"`
PageNo int `json:"page_no" default:"1"`
PageSize int `json:"page_size" default:"20"`
Items []*Task `json:"items"`
}
// TaskInfo is to set as value of memcache key(mid)
type TaskInfo struct {
MID int64
LogDate xtime.Time
SourceType int
Platform int
Empty bool
}

View File

@@ -0,0 +1,26 @@
package model
import (
xtime "go-common/library/time"
)
// TaskLog is record task
type TaskLog struct {
ID int64 `json:"id"`
TaskID int64 `json:"task_id"`
MID int64 `json:"mid"`
Build string `json:"build"`
Platform int `json:"platform"`
TaskState int `json:"task_state"`
Reason string `json:"reason"`
CTime xtime.Time `json:"ctime"`
MTime xtime.Time `json:"mtime"`
}
// TaskLogPager TaskLog Pager
type TaskLogPager struct {
Total int64 `json:"total"`
PageNo int `json:"page_no" default:"1"`
PageSize int `json:"page_size" default:"20"`
Items []*TaskLog `json:"items"`
}