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,35 @@
package(default_visibility = ["//visibility:public"])
load(
"@io_bazel_rules_go//go:def.bzl",
"go_library",
)
go_library(
name = "go_default_library",
srcs = [
"medal.go",
"message.go",
"notify.go",
"pendant.go",
"trans.go",
],
importpath = "go-common/app/job/main/usersuit/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,21 @@
package model
const (
// OwnerInstall is_activated=1.
OwnerInstall = 1
// OwnerUninstall is_activated=0.
OwnerUninstall = 0
)
// UpInfo .
type UpInfo struct {
Code int `json:"code"`
Data []*UpInfoGroup `json:"results"`
}
// UpInfoGroup .
type UpInfoGroup struct {
ID int64 `json:"id"`
Desc string `json:"desc"`
Mids []int64 `json:"mids"`
}

View File

@@ -0,0 +1,25 @@
package model
import "encoding/json"
// const .
const (
TimeFormatSec = "2006-01-02 15:04:05"
)
// Message is simple message struct info.
type Message struct {
Action string `json:"action"`
Table string `json:"table"`
New json.RawMessage `json:"new"`
Old json.RawMessage `json:"old"`
}
// VipInfoMessage .
type VipInfoMessage struct {
Mid int64 `json:"mid"`
VipType int8 `json:"vip_type"`
VipPayType int8 `json:"vip_pay_type"`
VipStatus int8 `json:"vip_status"`
VipOverdueTime string `json:"vip_overdue_time"`
}

View File

@@ -0,0 +1,14 @@
package model
//const
const (
AccountNotifyUpdatePendant = "updatePendant"
AccountNotifyUpdateMedal = "updateMedal"
)
// AccountNotify .
type AccountNotify struct {
UID int64 `json:"mid"`
Type string `json:"type"`
Action string `json:"action"`
}

View File

@@ -0,0 +1,8 @@
package model
// PendantEquip .
type PendantEquip struct {
Mid int64
Pid int64
Expires int64
}

View File

@@ -0,0 +1,116 @@
package model
import (
xtime "go-common/library/time"
)
// PendantGroupTrans pendant group pendant
type PendantGroupTrans struct {
Gid int64
GroupName string
Rank string
GroupImage string
IsOnline int32
ModifyTime string
}
// PendantTrans pendant trans
type PendantTrans struct {
Pid int64
Name string
Image string
ImageModel string
DisplayExpire int64
Gid int64
Rank int32
IsOnline int32
ModifyTime string
}
// PendantPriceTrans pendantPrice
type PendantPriceTrans struct {
ID int64
Pid int64
Ecode string
Price int64
Active int32
Ctime string
Mtime string
}
// PTransStatus pendant history
type PTransStatus struct {
ID int64 `json:"id"`
Mid int64 `json:"mid"`
Pid int64 `json:"pid"`
Expire int64 `json:"expire"`
IsActivated int64 `json:"is_activated"`
Mtime string `json:"modify_time"`
}
// PTransHistory pendant trans pendant info
type PTransHistory struct {
ID int64 `json:"id"`
Mid int64 `json:"mid"`
OrderID string `json:"order_id"`
PayID string `json:"pay_id"`
AppID int64 `json:"appid"`
Status int32 `json:"status"`
Pid int64 `json:"pid"`
TimeLength int64 `json:"time_length"`
Cost string `json:"cost"`
BuyTime int64 `json:"buy_time"`
IsCallback int32 `json:"is_callback"`
CallbackTime int64 `json:"callback_time"`
Mtime string `json:"modify_time"`
}
// PGTransHistory pendant grant history
type PGTransHistory struct {
ID int64
Mid int64
OperatorName string
OperatorTime int64
OperatorAction string
OperatorType int32
Mtime string
}
// MedalGroup struct .
type MedalGroup struct {
GID int64
Name string `json:"group_name"`
PID int64 `json:"parent_gid"`
Rank int8 `json:"group_rank"`
IsOnline int8 `json:"is_online"`
IsDel int8
Ctime xtime.Time
Mtime string `json:"modify_time"`
}
// MedalOwner struct db bus trans.
type MedalOwner struct {
ID int64
MID int64
NID int64
IsActivated int8 `json:"is_activated"`
Ctime int64
Mtime string `json:"modify_time"`
}
// MedalInfo struct .
type MedalInfo struct {
NID int64
GID int64
Name string
Description string
Image string `json:"image"`
ImageSmall string `json:"image_small"`
Condition string
Level int8
LevelRank string `json:"level_rank"`
Sort int8
IsOnline int8 `json:"is_online"`
CTime xtime.Time
MTime string `json:"modify_time"`
}