Create & Init Project...
This commit is contained in:
28
app/job/main/activity/model/bnj/BUILD
Normal file
28
app/job/main/activity/model/bnj/BUILD
Normal file
@ -0,0 +1,28 @@
|
||||
package(default_visibility = ["//visibility:public"])
|
||||
|
||||
load(
|
||||
"@io_bazel_rules_go//go:def.bzl",
|
||||
"go_library",
|
||||
)
|
||||
|
||||
go_library(
|
||||
name = "go_default_library",
|
||||
srcs = ["bnj.go"],
|
||||
importpath = "go-common/app/job/main/activity/model/bnj",
|
||||
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"],
|
||||
)
|
15
app/job/main/activity/model/bnj/bnj.go
Normal file
15
app/job/main/activity/model/bnj/bnj.go
Normal file
@ -0,0 +1,15 @@
|
||||
package bnj
|
||||
|
||||
// ResetMsg .
|
||||
type ResetMsg struct {
|
||||
Mid int64 `json:"mid"`
|
||||
Ts int64 `json:"ts"`
|
||||
}
|
||||
|
||||
// Push .
|
||||
type Push struct {
|
||||
Second int64 `json:"second"`
|
||||
Name string `json:"name"`
|
||||
TimelinePic string `json:"timeline_pic,omitempty"`
|
||||
H5TimelinePic string `json:"h5_timeline_pic,omitempty"`
|
||||
}
|
28
app/job/main/activity/model/dm/BUILD
Normal file
28
app/job/main/activity/model/dm/BUILD
Normal file
@ -0,0 +1,28 @@
|
||||
package(default_visibility = ["//visibility:public"])
|
||||
|
||||
load(
|
||||
"@io_bazel_rules_go//go:def.bzl",
|
||||
"go_library",
|
||||
)
|
||||
|
||||
go_library(
|
||||
name = "go_default_library",
|
||||
srcs = ["dm_post.go"],
|
||||
importpath = "go-common/app/job/main/activity/model/dm",
|
||||
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"],
|
||||
)
|
46
app/job/main/activity/model/dm/dm_post.go
Normal file
46
app/job/main/activity/model/dm/dm_post.go
Normal file
@ -0,0 +1,46 @@
|
||||
package dm
|
||||
|
||||
import "encoding/json"
|
||||
|
||||
const (
|
||||
// ActionPost dm action
|
||||
ActionPost = "post"
|
||||
// BroadcastCMD dm broadcast command
|
||||
BroadcastCMD = "DM"
|
||||
// BroadcastCMDACT BroadcastCMDACT
|
||||
BroadcastCMDACT = "ACT"
|
||||
)
|
||||
|
||||
// XML dm xml info
|
||||
type XML struct {
|
||||
PlayTime float32 `json:"playtime"`
|
||||
Mode int32 `json:"mode"`
|
||||
FontSize int32 `json:"fontsize"`
|
||||
Color int32 `json:"color"`
|
||||
Times int64 `json:"times"`
|
||||
PoolID int32 `json:"poolid"`
|
||||
Hash string `json:"hash"`
|
||||
DMID int64 `json:"dmid"`
|
||||
Msg string `json:"msg"`
|
||||
Random string `json:"rnd"`
|
||||
}
|
||||
|
||||
// Broadcast dm broadcast
|
||||
type Broadcast struct {
|
||||
RoomID int64 `json:"roomid"`
|
||||
CMD string `json:"cmd"`
|
||||
Info json.RawMessage `json:"info"`
|
||||
}
|
||||
|
||||
// ActDM ActDM
|
||||
type ActDM struct {
|
||||
Act int64 `json:"act"`
|
||||
Aid int64 `json:"aid"`
|
||||
Next int64 `json:"next"`
|
||||
No int64 `json:"no"`
|
||||
Yes int64 `json:"yes"`
|
||||
Stage int64 `json:"stage"`
|
||||
Title string `json:"title"`
|
||||
Author string `json:"author"`
|
||||
Tname string `json:"tname"`
|
||||
}
|
28
app/job/main/activity/model/kfc/BUILD
Normal file
28
app/job/main/activity/model/kfc/BUILD
Normal file
@ -0,0 +1,28 @@
|
||||
package(default_visibility = ["//visibility:public"])
|
||||
|
||||
load(
|
||||
"@io_bazel_rules_go//go:def.bzl",
|
||||
"go_library",
|
||||
)
|
||||
|
||||
go_library(
|
||||
name = "go_default_library",
|
||||
srcs = ["kfc.go"],
|
||||
importpath = "go-common/app/job/main/activity/model/kfc",
|
||||
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"],
|
||||
)
|
7
app/job/main/activity/model/kfc/kfc.go
Normal file
7
app/job/main/activity/model/kfc/kfc.go
Normal file
@ -0,0 +1,7 @@
|
||||
package kfc
|
||||
|
||||
// CouponMsg .
|
||||
type CouponMsg struct {
|
||||
CouponID int64 `json:"coupon_id"`
|
||||
UID int64 `json:"uid"`
|
||||
}
|
35
app/job/main/activity/model/like/BUILD
Normal file
35
app/job/main/activity/model/like/BUILD
Normal 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 = [
|
||||
"like.go",
|
||||
"subject.go",
|
||||
],
|
||||
importpath = "go-common/app/job/main/activity/model/like",
|
||||
tags = ["automanaged"],
|
||||
visibility = ["//visibility:public"],
|
||||
deps = [
|
||||
"//app/service/main/archive/api:go_default_library",
|
||||
"//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"],
|
||||
)
|
93
app/job/main/activity/model/like/like.go
Normal file
93
app/job/main/activity/model/like/like.go
Normal file
@ -0,0 +1,93 @@
|
||||
package like
|
||||
|
||||
import (
|
||||
"database/sql/driver"
|
||||
"go-common/app/service/main/archive/api"
|
||||
"time"
|
||||
)
|
||||
|
||||
// Like like
|
||||
type Like struct {
|
||||
ID int64 `json:"id"`
|
||||
Wid int64 `json:"wid"`
|
||||
Archive *api.Arc `json:"archive,omitempty"`
|
||||
}
|
||||
|
||||
// Item like item struct.
|
||||
type Item struct {
|
||||
ID int64 `json:"id"`
|
||||
Wid int64 `json:"wid"`
|
||||
Ctime wocaoTime `json:"ctime"`
|
||||
Sid int64 `json:"sid"`
|
||||
Type int `json:"type"`
|
||||
Mid int64 `json:"mid"`
|
||||
State int `json:"state"`
|
||||
StickTop int `json:"stick_top"`
|
||||
Mtime wocaoTime `json:"mtime"`
|
||||
}
|
||||
|
||||
// Content like_content.
|
||||
type Content struct {
|
||||
ID int64 `json:"id"`
|
||||
Message string `json:"message"`
|
||||
IP int64 `json:"ip"`
|
||||
Plat int `json:"plat"`
|
||||
Device int `json:"device"`
|
||||
Ctime wocaoTime `json:"ctime"`
|
||||
Mtime wocaoTime `json:"mtime"`
|
||||
Image string `json:"image"`
|
||||
Reply string `json:"reply"`
|
||||
Link string `json:"link"`
|
||||
ExName string `json:"ex_name"`
|
||||
}
|
||||
|
||||
// WebData act web data.
|
||||
type WebData struct {
|
||||
ID int64 `json:"id"`
|
||||
Vid int64 `json:"vid"`
|
||||
Data string `json:"data"`
|
||||
}
|
||||
|
||||
// Action like_action .
|
||||
type Action struct {
|
||||
ID int64 `json:"id"`
|
||||
Lid int64 `json:"lid"`
|
||||
Mid int64 `json:"mid"`
|
||||
Action int64 `json:"action"`
|
||||
Ctime wocaoTime `json:"ctime"`
|
||||
Mtime wocaoTime `json:"mtime"`
|
||||
Sid int64 `json:"sid"`
|
||||
IP int64 `json:"ip"`
|
||||
}
|
||||
|
||||
// Extend .
|
||||
type Extend struct {
|
||||
ID int64 `json:"id"`
|
||||
Lid int64 `json:"lid"`
|
||||
Like int64 `json:"like"`
|
||||
Ctime wocaoTime `json:"ctime"`
|
||||
Mtime wocaoTime `json:"mtime"`
|
||||
}
|
||||
|
||||
// LastTmStat .
|
||||
type LastTmStat struct {
|
||||
Last int64
|
||||
}
|
||||
|
||||
type wocaoTime string
|
||||
|
||||
// Scan scan time.
|
||||
func (jt *wocaoTime) Scan(src interface{}) (err error) {
|
||||
switch sc := src.(type) {
|
||||
case time.Time:
|
||||
*jt = wocaoTime(sc.Format("2006-01-02 15:04:05"))
|
||||
case string:
|
||||
*jt = wocaoTime(sc)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// Value get time value.
|
||||
func (jt wocaoTime) Value() (driver.Value, error) {
|
||||
return time.Parse("2006-01-02 15:04:05", string(jt))
|
||||
}
|
65
app/job/main/activity/model/like/subject.go
Normal file
65
app/job/main/activity/model/like/subject.go
Normal file
@ -0,0 +1,65 @@
|
||||
package like
|
||||
|
||||
import xtime "go-common/library/time"
|
||||
|
||||
// Subject subject
|
||||
type Subject struct {
|
||||
ID int64 `json:"id"`
|
||||
Name string `json:"name"`
|
||||
Dic string `json:"dic"`
|
||||
Cover string `json:"cover"`
|
||||
Stime xtime.Time `json:"stime"`
|
||||
Etime xtime.Time `json:"etime"`
|
||||
Interval int64 `json:"interval"`
|
||||
Tlimit int64 `json:"tlimit"`
|
||||
Ltime int64 `json:"ltime"`
|
||||
List []*Like `json:"list"`
|
||||
}
|
||||
|
||||
// ActSubject .
|
||||
type ActSubject struct {
|
||||
ID int64 `json:"id"`
|
||||
Oid int64 `json:"oid"`
|
||||
Type int `json:"type"`
|
||||
State int `json:"state"`
|
||||
Stime wocaoTime `json:"stime"`
|
||||
Etime wocaoTime `json:"etime"`
|
||||
Ctime wocaoTime `json:"ctime"`
|
||||
Mtime wocaoTime `json:"mtime"`
|
||||
Name string `json:"name"`
|
||||
Author string `json:"author"`
|
||||
ActURL string `json:"act_url"`
|
||||
Lstime wocaoTime `json:"lstime"`
|
||||
Letime wocaoTime `json:"letime"`
|
||||
Cover string `json:"cover" `
|
||||
Dic string `json:"dic"`
|
||||
Flag int64 `json:"flag"`
|
||||
Uetime wocaoTime `json:"uetime"`
|
||||
Ustime wocaoTime `json:"ustime"`
|
||||
Level int `json:"level"`
|
||||
H5Cover string `json:"h5_cover"`
|
||||
Rank int64 `json:"rank"`
|
||||
LikeLimit int `json:"like_limit"`
|
||||
}
|
||||
|
||||
// SubjectTotalStat .
|
||||
type SubjectTotalStat struct {
|
||||
SumCoin int64 `json:"sum_coin"`
|
||||
SumFav int64 `json:"sum_fav"`
|
||||
SumLike int64 `json:"sum_like"`
|
||||
SumView int64 `json:"sum_view"`
|
||||
Count int `json:"count"`
|
||||
}
|
||||
|
||||
// VipActOrder .
|
||||
type VipActOrder struct {
|
||||
ID int64 `json:"id"`
|
||||
Mid int64 `json:"mid"`
|
||||
OrderNo string `json:"order_no"`
|
||||
ProductID string `json:"product_id"`
|
||||
Ctime wocaoTime `json:"ctime"`
|
||||
Mtime wocaoTime `json:"mtime"`
|
||||
PanelType string `json:"panel_type"`
|
||||
Months int `json:"months"`
|
||||
AssociateState int `json:"associate_state"`
|
||||
}
|
28
app/job/main/activity/model/match/BUILD
Normal file
28
app/job/main/activity/model/match/BUILD
Normal file
@ -0,0 +1,28 @@
|
||||
package(default_visibility = ["//visibility:public"])
|
||||
|
||||
load(
|
||||
"@io_bazel_rules_go//go:def.bzl",
|
||||
"go_library",
|
||||
)
|
||||
|
||||
go_library(
|
||||
name = "go_default_library",
|
||||
srcs = ["match.go"],
|
||||
importpath = "go-common/app/job/main/activity/model/match",
|
||||
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"],
|
||||
)
|
37
app/job/main/activity/model/match/match.go
Normal file
37
app/job/main/activity/model/match/match.go
Normal file
@ -0,0 +1,37 @@
|
||||
package match
|
||||
|
||||
import "encoding/json"
|
||||
|
||||
// ActUpdate .
|
||||
const (
|
||||
ActUpdate = "update"
|
||||
ActInsert = "insert"
|
||||
ActDelete = "delete"
|
||||
ResultNo = 0
|
||||
ResultHome = 1
|
||||
ResultDraw = 2
|
||||
ResultAway = 3
|
||||
)
|
||||
|
||||
// Message canal binlog message.
|
||||
type Message struct {
|
||||
Action string `json:"action"`
|
||||
Table string `json:"table"`
|
||||
New json.RawMessage `json:"new"`
|
||||
Old json.RawMessage `json:"old"`
|
||||
}
|
||||
|
||||
// ActMatchObj match object struct.
|
||||
type ActMatchObj struct {
|
||||
ID int64 `json:"id"`
|
||||
MatchID int64 `json:"match_id"`
|
||||
SID int64 `json:"sid"`
|
||||
Result int `json:"result"`
|
||||
}
|
||||
|
||||
// ActMatchUser match user.
|
||||
type ActMatchUser struct {
|
||||
Mid int64
|
||||
Result int
|
||||
Stake int64
|
||||
}
|
Reference in New Issue
Block a user