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,32 @@
package(default_visibility = ["//visibility:public"])
load(
"@io_bazel_rules_go//go:def.bzl",
"go_library",
)
go_library(
name = "go_default_library",
srcs = [
"card.go",
"common.go",
"log.go",
],
importpath = "go-common/app/admin/main/feed/model/common",
tags = ["automanaged"],
visibility = ["//visibility:public"],
)
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,20 @@
package common
const (
//CardPgc .
CardPgc = "pgc"
//CardAv card av
CardAv = "av"
//CardUp card uper
CardUp = "up"
//CardChannelTab .
CardChannelTab = "channel_tab"
//CardEventTopic 事件专题卡片
CardEventTopic = "event_topic"
//CardPgcsRcmd pgc聚集卡
CardPgcsRcmd = "pgcs_rcmd"
//CardUpRcmdNew 热门新星卡片
CardUpRcmdNew = "up_rcmd_new"
//CardSearchWeb 搜索web卡片
CardSearchWeb = "search_web"
)

View File

@@ -0,0 +1,42 @@
package common
const (
//NotDeleted db not deleted
NotDeleted = 0
//Deleted db deleted
Deleted = 1
//Verify 待审核
Verify = 1
//Pass 已通过
Pass = 2
//Rejecte 已拒绝
Rejecte = 3
//Valid 已生效
Valid = 4
//InValid 已失效
InValid = 5
//StatusOnline status online
StatusOnline = 1
//StatusDownline status downline
StatusDownline = 0
//OptionOnline option online
OptionOnline = "online"
//OptionHidden option downline
OptionHidden = "hidden"
//OptionPass option pass
OptionPass = "pass"
//OptionReject option reject
OptionReject = "reject"
)
//Page pager
type Page struct {
Num int `json:"num"`
Size int `json:"size"`
Total int `json:"total"`
}
//CardPreview card preview
type CardPreview struct {
Title string `json:"title"`
}

View File

@@ -0,0 +1,53 @@
package common
const (
//BusinessID action log business ID
BusinessID = 204
//LogPopularStars popular new start card log
LogPopularStars = 0
//LogChannelTab channel tab log
LogChannelTab = 1
//LogEventTopic popular event topic log
LogEventTopic = 2
//LogSWEBCard search web card log
LogSWEBCard = 3
//LogSWEB search web log
LogSWEB = 4
)
//LogManager .
type LogManager struct {
ID int `json:"id"`
OID int `json:"oid"`
Uname string `json:"uname"`
UID int `json:"uid"`
Type int `json:"module"`
ExtraData string `json:"content"`
Action string `json:"action"`
CTime string `json:"ctime"`
}
//LogSearch .
type LogSearch struct {
ID int `json:"id"`
OID int `json:"oid"`
Uname string `json:"uname"`
UID int `json:"uid"`
Type int `json:"type"`
ExtraData string `json:"extra_data"`
Action string `json:"action"`
CTime string `json:"ctime"`
}
//ManagerPage .
type ManagerPage struct {
CurrentPage int `json:"current_page"`
TotalItems int `json:"total_items"`
PageSize int `json:"page_size"`
}
//LogManagers .
type LogManagers struct {
Item []*LogManager `json:"item"`
Page ManagerPage `json:"pager"`
}