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,29 @@
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/interface/main/activity/model/bnj",
tags = ["automanaged"],
visibility = ["//visibility:public"],
deps = ["//app/service/main/archive/api: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,55 @@
package bnj
import "go-common/app/service/main/archive/api"
// RewardTypes .
const (
RewardTypePendant = "pendant"
RewardTypeCoupon = "coupon"
)
// Reward .
type Reward struct {
Step int
Condition int64
RewardID string
RewardType string
Expire int64
}
// ResetMsg .
type ResetMsg struct {
Mid int64 `json:"mid"`
Ts int64 `json:"ts"`
}
// PreviewInfo .
type PreviewInfo struct {
ActID int64 `json:"act_id"`
SubID int64 `json:"sub_id"`
Info []*Info `json:"info"`
TimelinePic string `json:"timeline_pic"`
H5TimelinePic string `json:"h5_timeline_pic"`
GameCancel int64 `json:"game_cancel"`
RewardStep []int64 `json:"reward_step"`
HasRewardFirst int `json:"has_reward_first"`
HasRewardSecond int `json:"has_reward_second"`
}
// Timeline .
type Timeline struct {
TimelinePic string `json:"timeline_pic"`
H5TimelinePic string `json:"h5_timeline_pic"`
GameCancel int64 `json:"game_cancel"`
LikeCount int64 `json:"like_count"`
}
// Info .
type Info struct {
Nav string `json:"nav"`
Pic string `json:"pic"`
H5Pic string `json:"h5_pic"`
Arc *api.Arc `json:"arc"`
Detail string `json:"detail"`
H5Detail string `json:"h5_detail"`
}

View File

@@ -0,0 +1,63 @@
load(
"@io_bazel_rules_go//proto:def.bzl",
"go_proto_library",
)
package(default_visibility = ["//visibility:public"])
load(
"@io_bazel_rules_go//go:def.bzl",
"go_library",
)
go_library(
name = "go_default_library",
srcs = [
"achievement.go",
"params.go",
"point.go",
"user.go",
],
embed = [":bws_go_proto"],
importpath = "go-common/app/interface/main/activity/model/bws",
tags = ["automanaged"],
visibility = ["//visibility:public"],
deps = [
"//library/time:go_default_library",
"@com_github_gogo_protobuf//gogoproto:go_default_library",
"@com_github_golang_protobuf//proto: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"],
)
proto_library(
name = "bws_proto",
srcs = ["bws.proto"],
tags = ["automanaged"],
deps = ["@gogo_special_proto//github.com/gogo/protobuf/gogoproto"],
)
go_proto_library(
name = "bws_go_proto",
compilers = ["@io_bazel_rules_go//proto:gogofast_proto"],
importpath = "go-common/app/interface/main/activity/model/bws",
proto = ":bws_proto",
tags = ["automanaged"],
deps = [
"//library/time:go_default_library",
"@com_github_gogo_protobuf//gogoproto:go_default_library",
],
)

View File

@@ -0,0 +1,32 @@
package bws
import "go-common/library/time"
// UserAchieve .
type UserAchieve struct {
ID int64 `json:"id"`
Aid int64 `json:"aid"`
Award int64 `json:"award"`
Ctime time.Time `json:"ctime"`
}
// UserAchieveDetail .
type UserAchieveDetail struct {
*UserAchieve
Name string `json:"name"`
Icon string `json:"icon"`
Dic string `json:"dic"`
LockType int64 `json:"lockType"`
Unlock int64 `json:"unlock"`
Bid int64 `json:"bid"`
IconBig string `json:"icon_big"`
IconActive string `json:"icon_active"`
IconActiveBig string `json:"icon_active_big"`
SuitID int64 `json:"suit_id"`
}
// CountAchieves count achieve
type CountAchieves struct {
Aid int64 `json:"aid"`
Count int64 `json:"count"`
}

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,65 @@
syntax = "proto3";
package activity.service;
import "github.com/gogo/protobuf/gogoproto/gogo.proto";
option go_package = "bws";
option (gogoproto.goproto_enum_prefix_all) = false;
option (gogoproto.goproto_getters_all) = false;
option (gogoproto.unmarshaler_all) = true;
option (gogoproto.marshaler_all) = true;
option (gogoproto.sizer_all) = true;
message Users {
int64 ID = 1 [(gogoproto.jsontag) = "id"];
int64 Mid = 2 [(gogoproto.jsontag) = "mid"];
string Key = 3 [(gogoproto.jsontag) = "key"];
int64 Ctime = 4 [(gogoproto.jsontag) = "ctime", (gogoproto.casttype) = "go-common/library/time.Time"];
int64 Mtime = 5 [(gogoproto.jsontag) = "mtime", (gogoproto.casttype) = "go-common/library/time.Time"];
int64 Bid = 6 [(gogoproto.jsontag) = "bid"];
}
message Point {
int64 ID = 1 [(gogoproto.jsontag) = "id"];
string Name = 2 [(gogoproto.jsontag) = "name"];
string Icon = 3 [(gogoproto.jsontag) = "icon"];
int64 Fid = 4 [(gogoproto.jsontag) = "fid"];
string Image = 5 [(gogoproto.jsontag) = "image"];
int64 Unlocked = 6 [(gogoproto.jsontag) = "unlocked"];
int64 LockType = 7 [(gogoproto.jsontag) = "lockType"];
string Dic = 8 [(gogoproto.jsontag) = "dic"];
string Rule = 9 [(gogoproto.jsontag) = "rule"];
int64 Bid = 10 [(gogoproto.jsontag) = "bid"];
int64 LoseUnlocked = 11 [(gogoproto.jsontag) = "lose_unlocked"];
string OtherIp = 12 [(gogoproto.jsontag) = "other_ip"];
int64 Ower = 13 [(gogoproto.jsontag) = "ower"];
int64 Ctime = 14 [(gogoproto.jsontag) = "ctime", (gogoproto.casttype) = "go-common/library/time.Time"];
int64 Mtime = 15 [(gogoproto.jsontag) = "mtime", (gogoproto.casttype) = "go-common/library/time.Time"];
}
message Points {
repeated Point points = 1;
}
message Achievement {
int64 ID = 1 [(gogoproto.jsontag) = "id"];
string Name = 2 [(gogoproto.jsontag) = "name"];
string Icon = 3 [(gogoproto.jsontag) = "icon"];
string Dic = 4 [(gogoproto.jsontag) = "dic"];
int64 LockType = 5 [(gogoproto.jsontag) = "lockType"];
int64 Unlock = 6 [(gogoproto.jsontag) = "unlock"];
int64 Bid = 7 [(gogoproto.jsontag) = "bid"];
string IconBig = 8 [(gogoproto.jsontag) = "icon_big"];
string IconActive = 9 [(gogoproto.jsontag) = "icon_active"];
string IconActiveBig = 10 [(gogoproto.jsontag) = "icon_active_big"];
int64 Award = 11 [(gogoproto.jsontag) = "award"];
int64 UserCount = 12 [(gogoproto.jsontag) = "user_count"];
int64 Ctime = 13 [(gogoproto.jsontag) = "ctime", (gogoproto.casttype) = "go-common/library/time.Time"];
int64 Mtime = 14 [(gogoproto.jsontag) = "mtime", (gogoproto.casttype) = "go-common/library/time.Time"];
string Image = 15 [(gogoproto.jsontag) = "image"];
int64 SuitID = 16 [(gogoproto.jsontag) = "suit_id"];
}
message Achievements {
repeated Achievement achievements = 1;
}

View File

@@ -0,0 +1,43 @@
package bws
// GameRes .
const (
GameResWin = 1
GameResFail = 2
)
// ParamPoints points param
type ParamPoints struct {
Bid int64 `form:"bid" validate:"required"`
Tp int64 `form:"tp"`
}
// ParamID point or achievements id param
type ParamID struct {
Bid int64 `form:"bid" validate:"required"`
ID int64 `form:"id"`
Day string `form:"day"`
}
// ParamAward point or achievements id param
type ParamAward struct {
Bid int64 `form:"bid" validate:"required"`
Aid int64 `form:"aid" validate:"required"`
Key string `form:"key"`
Mid int64 `form:"mid"`
}
// ParamBinding binding param
type ParamBinding struct {
Bid int64 `form:"bid" validate:"required"`
Key string `form:"key" validate:"required"`
}
// ParamUnlock .
type ParamUnlock struct {
Bid int64 `form:"bid" validate:"required"`
Pid int64 `form:"pid" validate:"required"`
Key string `form:"key"`
Mid int64 `form:"mid"`
GameResult int `form:"game_result"`
}

View File

@@ -0,0 +1,26 @@
package bws
import "go-common/library/time"
// UserPoint .
type UserPoint struct {
ID int64 `json:"id"`
Pid int64 `json:"pid"`
Points int64 `json:"points"`
Ctime time.Time `json:"ctime"`
}
// UserPointDetail .
type UserPointDetail struct {
*UserPoint
Name string `json:"name"`
Icon string `json:"icon"`
Fid int64 `json:"fid"`
Image string `json:"image"`
Unlocked int64 `json:"unlocked"`
LoseUnlocked int64 `json:"lose_unlocked"`
LockType int64 `json:"lockType"`
Dic string `json:"dic"`
Rule string `json:"rule"`
Bid int64 `json:"bid"`
}

View File

@@ -0,0 +1,30 @@
package bws
// User .
type User struct {
User *UserInfo `json:"user"`
Achievements []*UserAchieveDetail `json:"achievements"`
Items map[string][]*UserPointDetail `json:"items"`
}
// UserInfo .
type UserInfo struct {
Mid int64 `json:"mid"`
Name string `json:"name"`
Key string `json:"key"`
Face string `json:"face"`
Hp int64 `json:"hp"`
}
// LotteryUser .
type LotteryUser struct {
Mid int64 `json:"mid"`
Name string `json:"name"`
Face string `json:"face"`
}
// AdminInfo .
type AdminInfo struct {
IsAdmin bool `json:"is_admin"`
Point interface{} `json:"point"`
}

View File

@@ -0,0 +1,58 @@
load(
"@io_bazel_rules_go//proto:def.bzl",
"go_proto_library",
)
package(default_visibility = ["//visibility:public"])
load(
"@io_bazel_rules_go//go:def.bzl",
"go_library",
)
proto_library(
name = "kfc_proto",
srcs = ["kfc.proto"],
tags = ["automanaged"],
deps = ["@gogo_special_proto//github.com/gogo/protobuf/gogoproto"],
)
go_proto_library(
name = "kfc_go_proto",
compilers = ["@io_bazel_rules_go//proto:gogofast_proto"],
importpath = "go-common/app/interface/main/activity/model/kfc",
proto = ":kfc_proto",
tags = ["automanaged"],
deps = [
"//library/time:go_default_library",
"@com_github_gogo_protobuf//gogoproto:go_default_library",
],
)
go_library(
name = "go_default_library",
srcs = [],
embed = [":kfc_go_proto"],
importpath = "go-common/app/interface/main/activity/model/kfc",
tags = ["automanaged"],
visibility = ["//visibility:public"],
deps = [
"//library/time:go_default_library",
"@com_github_gogo_protobuf//gogoproto:go_default_library",
"@com_github_golang_protobuf//proto: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,553 @@
// Code generated by protoc-gen-gogo. DO NOT EDIT.
// source: kfc.proto
package kfc
import proto "github.com/golang/protobuf/proto"
import fmt "fmt"
import math "math"
import _ "github.com/gogo/protobuf/gogoproto"
import go_common_library_time "go-common/library/time"
import io "io"
// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
var _ = fmt.Errorf
var _ = math.Inf
// This is a compile-time assertion to ensure that this generated file
// is compatible with the proto package it is being compiled against.
// A compilation error at this line likely means your copy of the
// proto package needs to be updated.
const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package
type BnjKfcCoupon struct {
ID int64 `protobuf:"varint,1,opt,name=ID,proto3" json:"id"`
Mid int64 `protobuf:"varint,2,opt,name=Mid,proto3" json:"mid"`
CouponCode string `protobuf:"bytes,3,opt,name=Coupon_code,json=CouponCode,proto3" json:"coupon_code"`
Desc string `protobuf:"bytes,4,opt,name=Desc,proto3" json:"desc"`
State int64 `protobuf:"varint,5,opt,name=State,proto3" json:"state"`
DeleteTime go_common_library_time.Time `protobuf:"varint,6,opt,name=Delete_time,json=DeleteTime,proto3,casttype=go-common/library/time.Time" json:"-"`
Ctime go_common_library_time.Time `protobuf:"varint,7,opt,name=Ctime,proto3,casttype=go-common/library/time.Time" json:"-"`
Mtime go_common_library_time.Time `protobuf:"varint,8,opt,name=Mtime,proto3,casttype=go-common/library/time.Time" json:"-"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *BnjKfcCoupon) Reset() { *m = BnjKfcCoupon{} }
func (m *BnjKfcCoupon) String() string { return proto.CompactTextString(m) }
func (*BnjKfcCoupon) ProtoMessage() {}
func (*BnjKfcCoupon) Descriptor() ([]byte, []int) {
return fileDescriptor_kfc_398e27aa918bebb1, []int{0}
}
func (m *BnjKfcCoupon) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
}
func (m *BnjKfcCoupon) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
if deterministic {
return xxx_messageInfo_BnjKfcCoupon.Marshal(b, m, deterministic)
} else {
b = b[:cap(b)]
n, err := m.MarshalTo(b)
if err != nil {
return nil, err
}
return b[:n], nil
}
}
func (dst *BnjKfcCoupon) XXX_Merge(src proto.Message) {
xxx_messageInfo_BnjKfcCoupon.Merge(dst, src)
}
func (m *BnjKfcCoupon) XXX_Size() int {
return m.Size()
}
func (m *BnjKfcCoupon) XXX_DiscardUnknown() {
xxx_messageInfo_BnjKfcCoupon.DiscardUnknown(m)
}
var xxx_messageInfo_BnjKfcCoupon proto.InternalMessageInfo
func init() {
proto.RegisterType((*BnjKfcCoupon)(nil), "activity.service.BnjKfcCoupon")
}
func (m *BnjKfcCoupon) Marshal() (dAtA []byte, err error) {
size := m.Size()
dAtA = make([]byte, size)
n, err := m.MarshalTo(dAtA)
if err != nil {
return nil, err
}
return dAtA[:n], nil
}
func (m *BnjKfcCoupon) MarshalTo(dAtA []byte) (int, error) {
var i int
_ = i
var l int
_ = l
if m.ID != 0 {
dAtA[i] = 0x8
i++
i = encodeVarintKfc(dAtA, i, uint64(m.ID))
}
if m.Mid != 0 {
dAtA[i] = 0x10
i++
i = encodeVarintKfc(dAtA, i, uint64(m.Mid))
}
if len(m.CouponCode) > 0 {
dAtA[i] = 0x1a
i++
i = encodeVarintKfc(dAtA, i, uint64(len(m.CouponCode)))
i += copy(dAtA[i:], m.CouponCode)
}
if len(m.Desc) > 0 {
dAtA[i] = 0x22
i++
i = encodeVarintKfc(dAtA, i, uint64(len(m.Desc)))
i += copy(dAtA[i:], m.Desc)
}
if m.State != 0 {
dAtA[i] = 0x28
i++
i = encodeVarintKfc(dAtA, i, uint64(m.State))
}
if m.DeleteTime != 0 {
dAtA[i] = 0x30
i++
i = encodeVarintKfc(dAtA, i, uint64(m.DeleteTime))
}
if m.Ctime != 0 {
dAtA[i] = 0x38
i++
i = encodeVarintKfc(dAtA, i, uint64(m.Ctime))
}
if m.Mtime != 0 {
dAtA[i] = 0x40
i++
i = encodeVarintKfc(dAtA, i, uint64(m.Mtime))
}
if m.XXX_unrecognized != nil {
i += copy(dAtA[i:], m.XXX_unrecognized)
}
return i, nil
}
func encodeVarintKfc(dAtA []byte, offset int, v uint64) int {
for v >= 1<<7 {
dAtA[offset] = uint8(v&0x7f | 0x80)
v >>= 7
offset++
}
dAtA[offset] = uint8(v)
return offset + 1
}
func (m *BnjKfcCoupon) Size() (n int) {
if m == nil {
return 0
}
var l int
_ = l
if m.ID != 0 {
n += 1 + sovKfc(uint64(m.ID))
}
if m.Mid != 0 {
n += 1 + sovKfc(uint64(m.Mid))
}
l = len(m.CouponCode)
if l > 0 {
n += 1 + l + sovKfc(uint64(l))
}
l = len(m.Desc)
if l > 0 {
n += 1 + l + sovKfc(uint64(l))
}
if m.State != 0 {
n += 1 + sovKfc(uint64(m.State))
}
if m.DeleteTime != 0 {
n += 1 + sovKfc(uint64(m.DeleteTime))
}
if m.Ctime != 0 {
n += 1 + sovKfc(uint64(m.Ctime))
}
if m.Mtime != 0 {
n += 1 + sovKfc(uint64(m.Mtime))
}
if m.XXX_unrecognized != nil {
n += len(m.XXX_unrecognized)
}
return n
}
func sovKfc(x uint64) (n int) {
for {
n++
x >>= 7
if x == 0 {
break
}
}
return n
}
func sozKfc(x uint64) (n int) {
return sovKfc(uint64((x << 1) ^ uint64((int64(x) >> 63))))
}
func (m *BnjKfcCoupon) Unmarshal(dAtA []byte) error {
l := len(dAtA)
iNdEx := 0
for iNdEx < l {
preIndex := iNdEx
var wire uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowKfc
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
wire |= (uint64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
fieldNum := int32(wire >> 3)
wireType := int(wire & 0x7)
if wireType == 4 {
return fmt.Errorf("proto: BnjKfcCoupon: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: BnjKfcCoupon: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 0 {
return fmt.Errorf("proto: wrong wireType = %d for field ID", wireType)
}
m.ID = 0
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowKfc
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
m.ID |= (int64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
case 2:
if wireType != 0 {
return fmt.Errorf("proto: wrong wireType = %d for field Mid", wireType)
}
m.Mid = 0
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowKfc
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
m.Mid |= (int64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
case 3:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field CouponCode", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowKfc
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
stringLen |= (uint64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
intStringLen := int(stringLen)
if intStringLen < 0 {
return ErrInvalidLengthKfc
}
postIndex := iNdEx + intStringLen
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.CouponCode = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
case 4:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Desc", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowKfc
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
stringLen |= (uint64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
intStringLen := int(stringLen)
if intStringLen < 0 {
return ErrInvalidLengthKfc
}
postIndex := iNdEx + intStringLen
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.Desc = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
case 5:
if wireType != 0 {
return fmt.Errorf("proto: wrong wireType = %d for field State", wireType)
}
m.State = 0
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowKfc
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
m.State |= (int64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
case 6:
if wireType != 0 {
return fmt.Errorf("proto: wrong wireType = %d for field DeleteTime", wireType)
}
m.DeleteTime = 0
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowKfc
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
m.DeleteTime |= (go_common_library_time.Time(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
case 7:
if wireType != 0 {
return fmt.Errorf("proto: wrong wireType = %d for field Ctime", wireType)
}
m.Ctime = 0
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowKfc
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
m.Ctime |= (go_common_library_time.Time(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
case 8:
if wireType != 0 {
return fmt.Errorf("proto: wrong wireType = %d for field Mtime", wireType)
}
m.Mtime = 0
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowKfc
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
m.Mtime |= (go_common_library_time.Time(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
default:
iNdEx = preIndex
skippy, err := skipKfc(dAtA[iNdEx:])
if err != nil {
return err
}
if skippy < 0 {
return ErrInvalidLengthKfc
}
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
iNdEx += skippy
}
}
if iNdEx > l {
return io.ErrUnexpectedEOF
}
return nil
}
func skipKfc(dAtA []byte) (n int, err error) {
l := len(dAtA)
iNdEx := 0
for iNdEx < l {
var wire uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return 0, ErrIntOverflowKfc
}
if iNdEx >= l {
return 0, io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
wire |= (uint64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
wireType := int(wire & 0x7)
switch wireType {
case 0:
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return 0, ErrIntOverflowKfc
}
if iNdEx >= l {
return 0, io.ErrUnexpectedEOF
}
iNdEx++
if dAtA[iNdEx-1] < 0x80 {
break
}
}
return iNdEx, nil
case 1:
iNdEx += 8
return iNdEx, nil
case 2:
var length int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return 0, ErrIntOverflowKfc
}
if iNdEx >= l {
return 0, io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
length |= (int(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
iNdEx += length
if length < 0 {
return 0, ErrInvalidLengthKfc
}
return iNdEx, nil
case 3:
for {
var innerWire uint64
var start int = iNdEx
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return 0, ErrIntOverflowKfc
}
if iNdEx >= l {
return 0, io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
innerWire |= (uint64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
innerWireType := int(innerWire & 0x7)
if innerWireType == 4 {
break
}
next, err := skipKfc(dAtA[start:])
if err != nil {
return 0, err
}
iNdEx = start + next
}
return iNdEx, nil
case 4:
return iNdEx, nil
case 5:
iNdEx += 4
return iNdEx, nil
default:
return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
}
}
panic("unreachable")
}
var (
ErrInvalidLengthKfc = fmt.Errorf("proto: negative length found during unmarshaling")
ErrIntOverflowKfc = fmt.Errorf("proto: integer overflow")
)
func init() { proto.RegisterFile("kfc.proto", fileDescriptor_kfc_398e27aa918bebb1) }
var fileDescriptor_kfc_398e27aa918bebb1 = []byte{
// 337 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x91, 0x3d, 0x6f, 0xea, 0x30,
0x14, 0x86, 0x71, 0x42, 0xf8, 0x30, 0x57, 0xba, 0x57, 0x1e, 0xae, 0xd2, 0xaf, 0x18, 0x55, 0x1d,
0x58, 0x48, 0x2a, 0x75, 0xeb, 0x18, 0xd2, 0x01, 0x55, 0x2c, 0x69, 0xa7, 0x2e, 0x88, 0x38, 0x4e,
0xea, 0x42, 0x30, 0x4a, 0x0c, 0x12, 0xff, 0xa4, 0x3f, 0x89, 0x91, 0x5f, 0x60, 0x15, 0xba, 0x65,
0xeb, 0xda, 0xa9, 0xca, 0xc9, 0xd0, 0x99, 0xed, 0x9c, 0xd7, 0xcf, 0xf3, 0x7a, 0x38, 0xb8, 0x3b,
0x4f, 0x98, 0xbb, 0xca, 0xa5, 0x92, 0xe4, 0xdf, 0x8c, 0x29, 0xb1, 0x11, 0x6a, 0xeb, 0x16, 0x3c,
0xdf, 0x08, 0xc6, 0xcf, 0x87, 0xa9, 0x50, 0xaf, 0xeb, 0xc8, 0x65, 0x32, 0xf3, 0x52, 0x99, 0x4a,
0x0f, 0xc0, 0x68, 0x9d, 0xc0, 0x06, 0x0b, 0x4c, 0x75, 0xc1, 0xf5, 0x97, 0x81, 0xff, 0xf8, 0xcb,
0xb7, 0xc7, 0x84, 0x8d, 0xe4, 0x7a, 0x25, 0x97, 0xe4, 0x3f, 0x36, 0xc6, 0x81, 0x8d, 0xfa, 0x68,
0x60, 0xfa, 0xad, 0x52, 0x53, 0x43, 0xc4, 0xa1, 0x31, 0x0e, 0xc8, 0x19, 0x36, 0x27, 0x22, 0xb6,
0x0d, 0x78, 0x68, 0x97, 0x9a, 0x9a, 0x99, 0x88, 0xc3, 0x2a, 0x23, 0xb7, 0xb8, 0x57, 0xcb, 0x53,
0x26, 0x63, 0x6e, 0x9b, 0x7d, 0x34, 0xe8, 0xfa, 0x7f, 0x4b, 0x4d, 0x7b, 0xec, 0x37, 0x0e, 0x71,
0xcd, 0x8c, 0x64, 0xcc, 0xc9, 0x25, 0x6e, 0x06, 0xbc, 0x60, 0x76, 0x13, 0xd0, 0x4e, 0xa9, 0x69,
0x33, 0xe6, 0x05, 0x0b, 0x21, 0x25, 0x14, 0x5b, 0x4f, 0x6a, 0xa6, 0xb8, 0x6d, 0xc1, 0x67, 0xdd,
0x52, 0x53, 0xab, 0xa8, 0x82, 0xb0, 0xce, 0xc9, 0x03, 0xee, 0x05, 0x7c, 0xc1, 0x15, 0x9f, 0x2a,
0x91, 0x71, 0xbb, 0x05, 0xd8, 0x4d, 0xa9, 0x29, 0x1a, 0x7e, 0x6b, 0x7a, 0x91, 0xca, 0x21, 0x93,
0x59, 0x26, 0x97, 0xde, 0x42, 0x44, 0xf9, 0x2c, 0xdf, 0x7a, 0x15, 0xe6, 0x3e, 0x8b, 0x8c, 0x87,
0xb8, 0x16, 0xab, 0x99, 0xdc, 0x63, 0x6b, 0x04, 0x05, 0xed, 0x13, 0x0a, 0x6a, 0xa5, 0x72, 0x27,
0xe0, 0x76, 0x4e, 0x71, 0x41, 0xf1, 0xaf, 0x76, 0x07, 0xa7, 0xb1, 0x3f, 0x38, 0x8d, 0xdd, 0xd1,
0x41, 0xfb, 0xa3, 0x83, 0x3e, 0x8e, 0x0e, 0x7a, 0xff, 0x74, 0x1a, 0x2f, 0xe6, 0x3c, 0x61, 0x51,
0x0b, 0x2e, 0x73, 0xf7, 0x13, 0x00, 0x00, 0xff, 0xff, 0x98, 0x5a, 0x85, 0xb0, 0xe7, 0x01, 0x00,
0x00,
}

View File

@@ -0,0 +1,24 @@
syntax = "proto3";
package activity.service;
import "github.com/gogo/protobuf/gogoproto/gogo.proto";
option go_package = "kfc";
option (gogoproto.goproto_enum_prefix_all) = false;
option (gogoproto.goproto_getters_all) = false;
option (gogoproto.unmarshaler_all) = true;
option (gogoproto.marshaler_all) = true;
option (gogoproto.sizer_all) = true;
message BnjKfcCoupon {
int64 ID = 1 [(gogoproto.jsontag) ="id"];
int64 Mid = 2 [(gogoproto.jsontag) ="mid"];
string Coupon_code = 3 [(gogoproto.jsontag) ="coupon_code"];
string Desc = 4 [(gogoproto.jsontag) ="desc"];
int64 State = 5 [(gogoproto.jsontag) ="state"];
int64 Delete_time = 6 [(gogoproto.jsontag) ="-", (gogoproto.casttype) = "go-common/library/time.Time"];
int64 Ctime = 7 [(gogoproto.jsontag) ="-", (gogoproto.casttype) = "go-common/library/time.Time"];
int64 Mtime = 8 [(gogoproto.jsontag) ="-", (gogoproto.casttype) = "go-common/library/time.Time"];
}

View File

@@ -0,0 +1,73 @@
load(
"@io_bazel_rules_go//proto:def.bzl",
"go_proto_library",
)
package(default_visibility = ["//visibility:public"])
load(
"@io_bazel_rules_go//go:def.bzl",
"go_library",
)
go_library(
name = "go_default_library",
srcs = [
"act.go",
"action.go",
"like.go",
"params.go",
"rpc.go",
"subject.go",
"useractievement.go",
],
embed = [":like_go_proto"],
importpath = "go-common/app/interface/main/activity/model/like",
tags = ["automanaged"],
visibility = ["//visibility:public"],
deps = [
"//app/service/main/archive/api:go_default_library",
"//library/time:go_default_library",
"@com_github_gogo_protobuf//gogoproto:go_default_library",
"@com_github_golang_protobuf//proto: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"],
)
proto_library(
name = "like_proto",
srcs = [
"achievements.proto",
"match.proto",
"missiongroup.proto",
"subject.proto",
],
tags = ["automanaged"],
visibility = ["//visibility:public"],
deps = ["@gogo_special_proto//github.com/gogo/protobuf/gogoproto"],
)
go_proto_library(
name = "like_go_proto",
compilers = ["@io_bazel_rules_go//proto:gogofast_proto"],
importpath = "go-common/app/interface/main/activity/model/like",
proto = ":like_proto",
tags = ["automanaged"],
deps = [
"//library/time:go_default_library",
"@com_github_gogo_protobuf//gogoproto:go_default_library",
],
)

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,40 @@
syntax = "proto3";
package activity.service;
import "github.com/gogo/protobuf/gogoproto/gogo.proto";
option go_package = "like";
option (gogoproto.goproto_enum_prefix_all) = false;
option (gogoproto.goproto_getters_all) = false;
option (gogoproto.unmarshaler_all) = true;
option (gogoproto.marshaler_all) = true;
option (gogoproto.sizer_all) = true;
message ActLikeAchievement {
int64 ID = 1 [(gogoproto.jsontag) ="id"];
string Name = 2 [(gogoproto.jsontag) ="name"];
string Icon = 3 [(gogoproto.jsontag) ="icon"];
string Dic = 4 [(gogoproto.jsontag) ="dic"];
int64 Unlock = 5 [(gogoproto.jsontag) ="unlock"];
int64 Ctime = 6 [(gogoproto.jsontag) ="ctime", (gogoproto.casttype) = "go-common/library/time.Time"];
int64 Mtime = 7 [(gogoproto.jsontag) ="mtime", (gogoproto.casttype) = "go-common/library/time.Time"];
int64 Del = 8 [(gogoproto.jsontag) ="del"];
int64 Sid = 9 [(gogoproto.jsontag) ="sid"];
string Image = 10 [(gogoproto.jsontag) ="image"];
int64 Award = 11 [(gogoproto.jsontag) ="award"];
}
message Achievements {
repeated ActLikeAchievement achievements = 1;
}
message ActLikeUserAchievement {
int64 ID = 1 [(gogoproto.jsontag) ="id"];
int64 Aid = 2 [(gogoproto.jsontag) ="aid"];
int64 Ctime = 3 [(gogoproto.jsontag) ="ctime", (gogoproto.casttype) = "go-common/library/time.Time"];
int64 Mtime = 4 [(gogoproto.jsontag) ="mtime", (gogoproto.casttype) = "go-common/library/time.Time"];
int64 Del = 5 [(gogoproto.jsontag) ="del"];
int64 Mid = 6 [(gogoproto.jsontag) ="mid"];
int64 Sid = 7 [(gogoproto.jsontag) ="sid"];
int64 Award = 8 [(gogoproto.jsontag) ="award"];
}

View File

@@ -0,0 +1,6 @@
package like
// RedDot bool
type RedDot struct {
RedDot bool `json:"red_dot"`
}

View File

@@ -0,0 +1,29 @@
package like
import (
xtime "go-common/library/time"
)
// action type
const (
LIKESCORE = 1
)
// Action def.
type Action struct {
ID int64 `json:"id"`
Lid int64 `json:"lid"`
Mid int64 `json:"mid"`
Action int64 `json:"action"`
Ctime xtime.Time `json:"ctime"`
Mtime xtime.Time `json:"mtime"`
Sid int64 `json:"sid"`
IP int64 `json:"ip"`
IPv6 []byte `json:"ipv6"`
}
// LidLikeSum def .
type LidLikeSum struct {
Likes int64
Lid int64
}

View File

@@ -0,0 +1,92 @@
package like
import (
garcmdl "go-common/app/service/main/archive/api"
xtime "go-common/library/time"
)
// Like struct
type Like struct {
*Item
Archive *garcmdl.Arc `json:"archive,omitempty"`
}
// Item like item struct.
type Item struct {
ID int64 `json:"id"`
Wid int64 `json:"wid"`
Ctime xtime.Time `json:"act_ctime"`
Sid int64 `json:"sid"`
Type int `json:"type"`
Mid int64 `json:"mid"`
State int `json:"state"`
StickTop int `json:"stick_top"`
Mtime xtime.Time `json:"mtime"`
}
// GroupItem .
type GroupItem struct {
ID int64 `json:"id"`
Sid int64 `json:"sid"`
State int `json:"state"`
Type int `json:"type"`
Mid int64 `json:"mid"`
Wid int64 `json:"wid"`
Ctime string `json:"ctime"`
Likes int `json:"likes"`
Liked int `json:"liked"`
Message string `json:"message"`
Device string `json:"device"`
Image string `json:"image"`
Plat string `json:"plat"`
Reply string `json:"reply"`
Link string `json:"link"`
}
// List .
type List struct {
*Item
Object interface{} `json:"object"`
Like int64 `json:"like"`
Likes int64 `json:"likes"`
HasLikes int8 `json:"has_likes"`
Click int64 `json:"click"`
Coin int64 `json:"coin"`
Share int64 `json:"share"`
Reply int64 `json:"reply"`
Dm int64 `json:"dm"`
Fav int64 `json:"fav"`
}
// ListInfo .
type ListInfo struct {
List []*List `json:"list"`
*Page
}
// LidLikeRes .
type LidLikeRes struct {
Score int64
Lid int64
}
// Extend like_extend .
type Extend struct {
ID int64 `json:"id"`
Lid int64 `json:"lid"`
Like int64 `json:"like"`
Ctime xtime.Time `json:"ctime"`
Mtime xtime.Time `json:"mtime"`
}
// Tag .
type Tag struct {
ID int64 `json:"tag_id,omitempty"`
Name string `json:"tag_name,omitempty"`
}
// ArgTag .
type ArgTag struct {
Archive *garcmdl.Arc `json:"archive,omitempty"`
Tags []string `json:"tags,omitempty"`
}

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,69 @@
syntax = "proto3";
package activity.service;
import "github.com/gogo/protobuf/gogoproto/gogo.proto";
option go_package = "like";
option (gogoproto.goproto_enum_prefix_all) = false;
option (gogoproto.goproto_getters_all) = false;
option (gogoproto.unmarshaler_all) = true;
option (gogoproto.marshaler_all) = true;
option (gogoproto.sizer_all) = true;
message Match {
int64 ID = 1 [(gogoproto.jsontag) = "id"];
int64 Sid = 2 [(gogoproto.jsontag) = "sid"];
int64 MaxStake = 3 [(gogoproto.jsontag) = "max_stake"];
int64 Stake = 4 [(gogoproto.jsontag) = "stake"];
string Name = 5 [(gogoproto.jsontag) = "name"];
string Url = 6 [(gogoproto.jsontag) = "url"];
string Cover = 7 [(gogoproto.jsontag) = "cover"];
int64 Ctime = 8 [(gogoproto.jsontag) = "ctime", (gogoproto.casttype) = "go-common/library/time.Time"];
int64 Mtime = 9 [(gogoproto.jsontag) = "mtime", (gogoproto.casttype) = "go-common/library/time.Time"];
}
message MatchList {
repeated Match matchList = 1;
}
message Object {
int64 ID = 1 [(gogoproto.jsontag) = "id"];
int64 MatchId = 2 [(gogoproto.jsontag) = "match_id"];
int64 Sid = 3 [(gogoproto.jsontag) = "sid"];
string HomeName = 4 [(gogoproto.jsontag) = "home_name"];
string HomeLogo = 5 [(gogoproto.jsontag) = "home_logo"];
int64 HomeScore = 6 [(gogoproto.jsontag) = "home_score"];
string AwayName = 7 [(gogoproto.jsontag) = "away_name"];
string AwayLogo = 8 [(gogoproto.jsontag) = "away_logo"];
int64 AwayScore = 9 [(gogoproto.jsontag) = "away_score"];
int64 Result = 10 [(gogoproto.jsontag) = "result"];
int64 Ctime = 11 [(gogoproto.jsontag) = "ctime", (gogoproto.casttype) = "go-common/library/time.Time"];
int64 Mtime = 12 [(gogoproto.jsontag) = "mtime", (gogoproto.casttype) = "go-common/library/time.Time"];
int64 Stime = 13 [(gogoproto.jsontag) = "stime", (gogoproto.casttype) = "go-common/library/time.Time"];
int64 Etime = 14 [(gogoproto.jsontag) = "etime", (gogoproto.casttype) = "go-common/library/time.Time"];
int64 UserResult = 15 [(gogoproto.jsontag) = "user_result"];
int64 GameStime = 16 [(gogoproto.jsontag) = "game_stime", (gogoproto.casttype) = "go-common/library/time.Time"];
string MatchName = 17 [(gogoproto.jsontag) = "match_name,omitempty"];
}
message UserLog {
int64 ID = 1 [(gogoproto.jsontag) = "id"];
int64 MatchId = 2 [(gogoproto.jsontag) = "match_id"];
int64 MOId = 3 [(gogoproto.jsontag) = "m_o_id"];
int64 Sid = 4 [(gogoproto.jsontag) = "sid"];
int64 Mid = 5 [(gogoproto.jsontag) = "mid"];
int64 Result = 6 [(gogoproto.jsontag) = "result"];
int64 Stake = 7 [(gogoproto.jsontag) = "stake"];
int64 Ctime = 8 [(gogoproto.jsontag) = "ctime", (gogoproto.casttype) = "go-common/library/time.Time"];
int64 Mtime = 9 [(gogoproto.jsontag) = "mtime", (gogoproto.casttype) = "go-common/library/time.Time"];
int64 ObjResult = 10 [(gogoproto.jsontag) = "obj_result"];
string HomeName = 11 [(gogoproto.jsontag) = "home_name"];
string AwayName = 12 [(gogoproto.jsontag) = "away_name"];
int64 GameStime = 13 [(gogoproto.jsontag) = "game_stime", (gogoproto.casttype) = "go-common/library/time.Time"];
}
message UserGuess {
int64 Total = 1 [(gogoproto.jsontag) = "total"];
int64 Win = 2 [(gogoproto.jsontag) = "win"];
}

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,36 @@
syntax = "proto3";
package activity.service;
import "github.com/gogo/protobuf/gogoproto/gogo.proto";
option go_package = "like";
option (gogoproto.goproto_enum_prefix_all) = false;
option (gogoproto.goproto_getters_all) = false;
option (gogoproto.unmarshaler_all) = true;
option (gogoproto.marshaler_all) = true;
option (gogoproto.sizer_all) = true;
message MissionGroup {
int64 ID = 1 [(gogoproto.jsontag) ="id"];
int64 Sid = 2 [(gogoproto.jsontag) ="sid"];
int64 Mid = 3 [(gogoproto.jsontag) ="mid"];
int64 State = 4 [(gogoproto.jsontag) ="state"];
int64 Ctime = 5 [(gogoproto.jsontag) ="ctime", (gogoproto.casttype) = "go-common/library/time.Time"];
int64 Mtime = 6 [(gogoproto.jsontag) ="mtime", (gogoproto.casttype) = "go-common/library/time.Time"];
}
message ActMissionGroup {
int64 ID = 1 [(gogoproto.jsontag) ="id"];
int64 Lid = 2 [(gogoproto.jsontag) ="lid"];
int64 Mid = 3 [(gogoproto.jsontag) ="mid"];
int64 Action = 4 [(gogoproto.jsontag) ="action"];
int64 Ctime = 5 [(gogoproto.jsontag) ="ctime", (gogoproto.casttype) = "go-common/library/time.Time"];
int64 Mtime = 6 [(gogoproto.jsontag) ="mtime", (gogoproto.casttype) = "go-common/library/time.Time"];
int64 Sid = 7 [(gogoproto.jsontag) ="sid"];
int64 IP = 8 [(gogoproto.jsontag) ="ip"];
bytes IPv6 = 9 [(gogoproto.jsontag) ="ipv6"];
}
message ActMissionGroups{
repeated ActMissionGroup actMissionGroups = 1;
}

View File

@@ -0,0 +1,65 @@
package like
// ParamMsg notify param msg.
type ParamMsg struct {
Msg string `form:"msg" validate:"required"`
}
// ParamTeams add follow param teams
type ParamTeams struct {
Teams []string `form:"teams,split" validate:"gt=0,dive,gt=0"`
}
// ParamSid sid param
type ParamSid struct {
Sid int64 `form:"sid" validate:"required,min=1"`
}
// ParamAddGuess add guess param
type ParamAddGuess struct {
ObjID int64 `form:"obj_id" validate:"required,min=1"`
Result int64 `form:"result" validate:"required,min=1"`
Stake int64 `form:"stake" validate:"gt=0"`
}
// ParamObject unstart object param
type ParamObject struct {
Sid int64 `form:"sid" validate:"required,min=1"`
Pn int `form:"pn" validate:"gt=0"`
Ps int `form:"ps" validate:"gt=0,lte=50"`
}
// ParamAddLikeAct add likeAct param
type ParamAddLikeAct struct {
Sid int64 `form:"sid" validate:"required,min=1"`
Lid int64 `form:"lid" validate:"required,min=1"`
Score int64 `form:"score" validate:"min=1,max=5"`
}
// ParamMissionLikeAct add missionAct param
type ParamMissionLikeAct struct {
Sid int64 `form:"sid" validate:"min=1"`
Lid int64 `form:"lid" validate:"min=1"`
}
// ParamMissionFriends get mission friends list
type ParamMissionFriends struct {
Sid int64 `form:"sid" validate:"min=1"`
Lid int64 `form:"lid" validate:"min=1"`
Size int `form:"size" validate:"min=1,max=50"`
}
// ParamStoryKingAct .
type ParamStoryKingAct struct {
Sid int64 `form:"sid" validate:"required,min=1"`
Lid int64 `form:"lid" validate:"required,min=1"`
Score int64 `form:"score" validate:"min=1,max=10"`
}
// ParamList .
type ParamList struct {
Sid int64 `form:"sid" validate:"min=1"`
Type string `form:"type" default:"like"`
Pn int `form:"pn" default:"1" validate:"min=1"`
Ps int `form:"ps" default:"30" validate:"min=1,max=100"`
}

View File

@@ -0,0 +1,33 @@
package like
// ArgMatch arg match
type ArgMatch struct {
Sid int64
}
// ArgSubjectUp .
type ArgSubjectUp struct {
Sid int64
}
// ArgLikeUp .
type ArgLikeUp struct {
Lid int64
}
// ArgLikeItem .
type ArgLikeItem struct {
ID int64
Sid int64
Type int
}
// ArgActSubject .
type ArgActSubject struct {
Sid int64
}
// ArgActProtocol .
type ArgActProtocol struct {
Sid int64
}

View File

@@ -0,0 +1,89 @@
package like
import (
xtime "go-common/library/time"
)
// Subject type.
const (
VIDEO = 1
PICTURE = 2
DRAWYOO = 3
VIDEOLIKE = 4
PICTURELIKE = 5
DRAWYOOLIKE = 6
TEXT = 7
TEXTLIKE = 8
ONLINEVOTE = 9
QUESTION = 10
LOTTERY = 11
ARTICLE = 12
VIDEO2 = 13
MUSIC = 15
PHONEVIDEO = 16
SMALLVIDEO = 17
RESERVATION = 18
MISSIONGROUP = 19
STORYKING = 20
FLAGFIRST = 1
FLAGSPY = 2
FLAGUSTIME = 4
FLAGUETIME = 8
FLAGLEVEL = 16
FLAGIP = 32
FLAGRANKCLOSE = 64
FLAGPHONEBIND = 128
)
// Subject group type
var (
VIDEOALL = []int64{VIDEO, VIDEOLIKE, VIDEO2, PHONEVIDEO, SMALLVIDEO}
LIKETYPE = []int64{VIDEOLIKE, PICTURELIKE, DRAWYOOLIKE, TEXTLIKE}
)
// Subject struct
type Subject struct {
ID int64 `json:"id"`
Name string `json:"name"`
Dic string `json:"dic"`
Cover string `json:"cover"`
Stime xtime.Time `json:"stime"`
Interval int32 `json:"interval"`
Tlimit int32 `json:"tlimit"`
Ltime int32 `json:"ltime"`
List []*Like `json:"list"`
}
// SubItem .
type SubItem struct {
ID int64 `json:"id"`
Ctime xtime.Time `json:"ctime"`
}
// SubjectStat .
type SubjectStat struct {
Sid int64 `json:"sid" form:"sid" validate:"min=1"`
Count int64 `json:"count" form:"count"`
View int64 `form:"view" form:"view"`
Like int64 `form:"like" form:"like"`
Fav int64 `form:"fav" form:"fav"`
Coin int64 `form:"coin" form:"coin"`
}
// SubjectScore .
type SubjectScore struct {
Score int64 `json:"score"`
}
// Page .
type Page struct {
Num int `json:"num"`
Size int `json:"size"`
Total int64 `json:"total"`
}
// SubProtocol .
type SubProtocol struct {
*SubjectItem
*ActSubjectProtocol
}

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,73 @@
syntax = "proto3";
package activity.service;
import "github.com/gogo/protobuf/gogoproto/gogo.proto";
option go_package = "like";
option (gogoproto.goproto_enum_prefix_all) = false;
option (gogoproto.goproto_getters_all) = false;
option (gogoproto.unmarshaler_all) = true;
option (gogoproto.marshaler_all) = true;
option (gogoproto.sizer_all) = true;
message SubjectItem {
int64 ID = 1 [(gogoproto.jsontag) ="id"];
int64 Oid = 2 [(gogoproto.jsontag) ="oid"];
int64 Type = 3 [(gogoproto.jsontag) ="type"];
int64 State = 4 [(gogoproto.jsontag) ="state"];
int64 Stime = 5 [(gogoproto.jsontag) ="stime", (gogoproto.casttype) = "go-common/library/time.Time"];
int64 Etime = 6 [(gogoproto.jsontag) ="etime", (gogoproto.casttype) = "go-common/library/time.Time"];
int64 Ctime = 7 [(gogoproto.jsontag) ="ctime", (gogoproto.casttype) = "go-common/library/time.Time"];
int64 Mtime = 8 [(gogoproto.jsontag) ="mtime", (gogoproto.casttype) = "go-common/library/time.Time"];
string Name = 9 [(gogoproto.jsontag) ="name"];
string Author = 10 [(gogoproto.jsontag) ="author"];
string ActURL = 11 [(gogoproto.jsontag) ="act_url"];
int64 Lstime = 12 [(gogoproto.jsontag) ="lstime", (gogoproto.casttype) = "go-common/library/time.Time"];
int64 Letime = 13 [(gogoproto.jsontag) ="letime", (gogoproto.casttype) = "go-common/library/time.Time"];
string Cover = 14 [(gogoproto.jsontag) ="cover"];
string Dic = 15 [(gogoproto.jsontag) ="dic"];
int64 Flag = 16 [(gogoproto.jsontag) ="flag"];
int64 Uetime = 17 [(gogoproto.jsontag) ="uetime", (gogoproto.casttype) = "go-common/library/time.Time"];
int64 Ustime = 18 [(gogoproto.jsontag) ="ustime", (gogoproto.casttype) = "go-common/library/time.Time"];
int64 Level = 19 [(gogoproto.jsontag) ="level"];
string H5_cover = 20 [(gogoproto.jsontag) ="h5_cover"];
int64 Rank = 21 [(gogoproto.jsontag) ="rank"];
int64 LikeLimit = 22 [(gogoproto.jsontag) ="like_limit"];
string AndroidURL = 23 [(gogoproto.jsontag) = "android_url"];
string IosURL = 24 [(gogoproto.jsontag) = "ios_url"];
int64 DailyLikeLimit = 25 [(gogoproto.jsontag) ="daily_like_limit"];
int64 DailySingleLikeLimit = 26 [(gogoproto.jsontag) ="daily_single_like_limit"];
}
message LikeContent {
int64 ID = 1 [(gogoproto.jsontag) ="id"];
string Message = 2 [(gogoproto.jsontag) ="message"];
int64 IP = 3 [(gogoproto.jsontag) ="ip"];
int64 Plat = 4 [(gogoproto.jsontag) ="plat"];
int64 Device = 5 [(gogoproto.jsontag) ="device"];
int64 Ctime = 6 [(gogoproto.jsontag) ="ctime", (gogoproto.casttype) = "go-common/library/time.Time"];
int64 Mtime = 7 [(gogoproto.jsontag) ="mtime", (gogoproto.casttype) = "go-common/library/time.Time"];
string Image = 8 [(gogoproto.jsontag) ="image"];
string Reply = 9 [(gogoproto.jsontag) ="reply"];
string Link = 10 [(gogoproto.jsontag) ="link"];
string ExName = 11 [(gogoproto.jsontag) ="ex_name"];
}
message ActSubjectProtocol {
int64 ID = 1 [(gogoproto.jsontag) ="id"];
int64 Sid = 2 [(gogoproto.jsontag) ="sid"];
string Protocol = 3 [(gogoproto.jsontag) ="protocol"];
int64 Mtime = 4 [(gogoproto.jsontag) ="mtime", (gogoproto.casttype) = "go-common/library/time.Time"];
int64 Ctime = 5 [(gogoproto.jsontag) ="ctime", (gogoproto.casttype) = "go-common/library/time.Time"];
string Types = 6 [(gogoproto.jsontag) ="types"];
string Tags = 7 [(gogoproto.jsontag) ="tags"];
int64 Pubtime = 8 [(gogoproto.jsontag) ="pubtime", (gogoproto.casttype) = "go-common/library/time.Time"];
int64 Deltime = 9 [(gogoproto.jsontag) ="deltime", (gogoproto.casttype) = "go-common/library/time.Time"];
int64 Editime = 10 [(gogoproto.jsontag) ="editime", (gogoproto.casttype) = "go-common/library/time.Time"];
int64 Hot = 11 [(gogoproto.jsontag) ="hot"];
int64 BgmID = 12 [(gogoproto.jsontag) ="bgm_id"];
int64 PasterID = 13 [(gogoproto.jsontag) ="paster_id"];
string Oids = 14 [(gogoproto.jsontag) ="oids"];
int64 ScreenSet = 15 [(gogoproto.jsontag) ="screen_set"];
}

View File

@@ -0,0 +1,49 @@
package like
// MissionAward .
type MissionAward struct {
ID int64 `json:"id"`
Award int64 `json:"award"`
Image string `json:"image"`
Name string `json:"name"`
}
// MissionFriends .
type MissionFriends struct {
Mid int64 `json:"mid"`
Name string `json:"name"`
Face string `json:"face"`
}
// MissionRank .
type MissionRank struct {
Lid int64 `json:"lid"`
Score int64 `json:"score"`
Rank int64 `json:"rank"`
}
// MissionLikeAct .
type MissionLikeAct struct {
Mlid int64 `json:"mlid"`
Lottery *Lottery `json:"lottery"`
}
// Lottery .
type Lottery struct {
Code int `json:"code"`
Msg string `json:"msg"`
Data struct {
Name string `json:"name"`
Sponsors string `json:"sponsors"`
SponsorsLogo string `json:"sponsors_logo"`
GiftID int64 `json:"gift_id"`
MessageTitle string `json:"message_title"`
MessageContent string `json:"message_content"`
} `json:"data"`
}
// MissionInfo .
type MissionInfo struct {
HasHelp int64 `json:"has_help"`
HasBuff int64 `json:"has_buff"`
}

View File

@@ -0,0 +1,31 @@
package(default_visibility = ["//visibility:public"])
load(
"@io_bazel_rules_go//go:def.bzl",
"go_library",
)
go_library(
name = "go_default_library",
srcs = [
"params.go",
"sports.go",
],
importpath = "go-common/app/interface/main/activity/model/sports",
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,12 @@
package sports
// ParamQq qq param
type ParamQq struct {
Tp int64 `form:"tp"`
Route string `form:"route"`
}
// ParamNews qq news param.
type ParamNews struct {
Route string `form:"route" validate:"required"`
}

View File

@@ -0,0 +1,22 @@
package sports
import "encoding/json"
// QqRes qq result
type QqRes struct {
Ret int `json:"ret,omitempty"`
IDlist json.RawMessage `json:"idlist,omitempty"`
ID string `json:"id"`
Title string `json:"title"`
URL string `json:"url"`
Kurl string `json:"kurl"`
Atype interface{} `json:"atype"`
Img json.RawMessage `json:"img"`
Cid string `json:"cid"`
Src string `json:"src"`
Time int64 `json:"time"`
Pubtime string `json:"pubtime"`
Surl string `json:"surl"`
Content json.RawMessage `json:"content"`
Voteid interface{} `json:"voteid"`
}

View File

@@ -0,0 +1,55 @@
load(
"@io_bazel_rules_go//proto:def.bzl",
"go_proto_library",
)
package(default_visibility = ["//visibility:public"])
load(
"@io_bazel_rules_go//go:def.bzl",
"go_library",
)
proto_library(
name = "timemachine_proto",
srcs = ["timemachine.proto"],
tags = ["automanaged"],
deps = ["@gogo_special_proto//github.com/gogo/protobuf/gogoproto"],
)
go_proto_library(
name = "timemachine_go_proto",
compilers = ["@io_bazel_rules_go//proto:gogofast_proto"],
importpath = "go-common/app/interface/main/activity/model/timemachine",
proto = ":timemachine_proto",
tags = ["automanaged"],
deps = ["@com_github_gogo_protobuf//gogoproto:go_default_library"],
)
go_library(
name = "go_default_library",
srcs = ["model.go"],
embed = [":timemachine_go_proto"],
importpath = "go-common/app/interface/main/activity/model/timemachine",
tags = ["automanaged"],
visibility = ["//visibility:public"],
deps = [
"//app/service/main/archive/api:go_default_library",
"@com_github_gogo_protobuf//gogoproto:go_default_library",
"@com_github_golang_protobuf//proto: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,113 @@
package timemachine
import "go-common/app/service/main/archive/api"
// Timemachine .
type Timemachine struct {
Mid int64 `json:"mid"`
Face string `json:"face"`
Uname string `json:"uname"`
RegTime string `json:"reg_time"`
RegDay int64 `json:"reg_day"`
IsUp int64 `json:"is_up"`
DurationHour int64 `json:"duration_hour"`
ArchiveVv int64 `json:"archive_vv"`
LikeTagID int64 `json:"like_tag_id"`
LikeTagName string `json:"like_tag_name"`
LikeTagDescFirst string `json:"like_tag_desc_first"`
LikeTagDescSecond string `json:"like_tag_desc_second"`
LikeTagDescSecond2 string `json:"like_tag_desc_second2"`
LikeSubtidVv int64 `json:"like_subtid_vv"`
Likes3Arcs []*TmArc `json:"likes_3arcs"`
LikeBestUpID int64 `json:"like_best_upid"`
LikeBestUpName string `json:"like_best_up_name"`
LikeBestUpFace string `json:"like_best_up_face"`
LikeUpAvDuration int64 `json:"like_up_av_duration"`
LikeUpLiveDuration int64 `json:"like_up_live_duration"`
LikeUpDuration int64 `json:"like_up_duration"`
LikeUp3Arcs []*TmArc `json:"like_up_3arcs"`
LikeLiveUpSubTname string `json:"like_live_up_sub_tname"`
BrainwashCirTime string `json:"brainwash_cir_time"`
BrainwashCirArc *TmArc `json:"brainwash_cir_arc"`
BrainwashCirVv int64 `json:"brainwash_cir_vv"`
FirstSubmitArc *TmArc `json:"first_submit_arc"`
FirstSubmitTime string `json:"first_submit_time"`
FirstSubmitType int64 `json:"first_submit_type"`
SubmitAvsRds string `json:"submit_avs_rds"`
BestArc *TmArc `json:"best_arc"`
BestAvidType int64 `json:"best_avid_type"`
BestArcOld *TmArc `json:"best_arc_old"`
BestAvidOldType int64 `json:"best_avid_old_type"`
OldAvVv int64 `json:"old_av_vv"`
AllVv int64 `json:"all_vv"`
UpLiveDuration int64 `json:"up_live_duration"`
IsLiveUp int64 `json:"is_live_up"`
ValidLiveDays int64 `json:"valid_live_days"`
MaxCdnNumDate string `json:"max_cdn_num_date"`
MaxCdnNum int64 `json:"max_cdn_num"`
AddAttentions int64 `json:"add_attentions"`
Fans int64 `json:"fans"`
UpBestFanVv *FavVv `json:"up_best_fan_vv"`
UpBestFanLiveMinute *FanMinute `json:"up_best_fan_live_minute"`
WinRatio string `json:"win_ratio"`
Like2Tnames string `json:"like_2tnames"`
Like2SubTnames string `json:"like_2sub_tnames"`
LikeSubDesc1 string `json:"like_sub_desc1"`
LikeSubDesc2 string `json:"like_sub_desc2"`
LikeSubDesc3 string `json:"like_sub_desc3"`
}
// AidView aid view.
type AidView struct {
Aid int64 `json:"aid"`
View int64 `json:"view"`
}
// FavVv .
type FavVv struct {
Mid int64 `json:"mid"`
Name string `json:"name"`
Face string `json:"face"`
Vv int64 `json:"vv"`
}
// FanMinute .
type FanMinute struct {
Mid int64 `json:"mid"`
Name string `json:"name"`
Face string `json:"face"`
Minute int64 `json:"minute"`
}
// TmArc time machine arc.
type TmArc struct {
Aid int64 `json:"aid"`
Title string `json:"title"`
Cover string `json:"cover"`
Author api.Author `json:"author"`
}
// TagDesc tag desc.
type TagDesc struct {
TagID int64 `json:"tag_id"`
TagName string `json:"tag_name"`
Desc1 string `json:"desc1"`
Desc2Line1 string `json:"desc2_line1"`
Desc2Line2 string `json:"desc2_line2"`
}
// TagRegionDesc tag region desc.
type TagRegionDesc struct {
RID int64 `json:"rid"`
Desc1 string `json:"desc1"`
Desc2Line1 string `json:"desc2_line1"`
Desc2Line2 string `json:"desc2_line2"`
}
// RegionDesc region desc.
type RegionDesc struct {
RID int64 `json:"rid"`
Desc1 string `json:"desc1"`
Desc2 string `json:"desc2"`
Desc3 string `json:"desc3"`
}

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,54 @@
syntax = "proto3";
package activity.job;
import "github.com/gogo/protobuf/gogoproto/gogo.proto";
option go_package = "timemachine";
option (gogoproto.goproto_enum_prefix_all) = false;
option (gogoproto.goproto_getters_all) = false;
option (gogoproto.unmarshaler_all) = true;
option (gogoproto.marshaler_all) = true;
option (gogoproto.sizer_all) = true;
message Item {
int64 Mid = 1 [(gogoproto.jsontag) = "mid"];
int64 IsUp = 2 [(gogoproto.jsontag) = "is_up"];
int64 DurationHour = 3 [(gogoproto.jsontag) = "duration_hour"];
int64 AvDurationHour = 4 [(gogoproto.jsontag) = "av_duration_hour"];
int64 ArchiveVv = 5 [(gogoproto.jsontag) = "archive_vv"];
int64 LikeTagID = 6 [(gogoproto.jsontag) = "like_tag_id"];
int64 LikeSubtidVv = 7 [(gogoproto.jsontag) = "like_subtid_vv"];
string LikesUgc3Avids = 8 [(gogoproto.jsontag) = "likes_ugc_3avids"];
string LikePgc3Avids = 9 [(gogoproto.jsontag) = "like_pgc_3avids"];
int64 LikeBestUpID = 10 [(gogoproto.jsontag) = "like_best_upid"];
int64 LikeUpAvDuration = 11 [(gogoproto.jsontag) = "like_up_av_duration"];
int64 LikeUpLiveDuration = 12 [(gogoproto.jsontag) = "like_up_live_duration"];
string LikeUp3Avs = 13 [(gogoproto.jsontag) = "like_up_3avs"];
string LikeLiveUpSubTname = 14 [(gogoproto.jsontag) = "like_live_up_sub_tname"];
string BrainwashCirTime = 15 [(gogoproto.jsontag) = "brainwash_cir_time"];
int64 BrainwashCirAvid = 16 [(gogoproto.jsontag) = "brainwash_cir_avid"];
int64 BrainwashCirVv = 17 [(gogoproto.jsontag) = "brainwash_cir_vv"];
int64 FirstSubmitAvid = 18 [(gogoproto.jsontag) = "first_submit_avid"];
string FirstSubmitTime = 19 [(gogoproto.jsontag) = "first_submit_time"];
int64 FirstSubmitType = 20 [(gogoproto.jsontag) = "first_submit_type"];
string SubmitAvsRds = 21 [(gogoproto.jsontag) = "submit_avs_rds"];
int64 BestAvid = 22 [(gogoproto.jsontag) = "best_avid"];
int64 BestAvidType = 23 [(gogoproto.jsontag) = "best_avid_type"];
int64 BestAvidOld = 24 [(gogoproto.jsontag) = "best_avid_old"];
int64 BestAvidOldType = 25 [(gogoproto.jsontag) = "best_avid_old_type"];
int64 OldAvVv = 26 [(gogoproto.jsontag) = "old_av_vv"];
int64 AllVv = 27 [(gogoproto.jsontag) = "all_vv"];
int64 UpLiveDuration = 28 [(gogoproto.jsontag) = "up_live_duration"];
int64 IsLiveUp = 29 [(gogoproto.jsontag) = "is_live_up"];
int64 ValidLiveDays = 30 [(gogoproto.jsontag) = "valid_live_days"];
string MaxCdnNumDate = 31 [(gogoproto.jsontag) = "max_cdn_num_date"];
int64 MaxCdnNum = 32 [(gogoproto.jsontag) = "max_cdn_num"];
int64 Attentions = 33 [(gogoproto.jsontag) = "attentions"];
string UpBestFanVv = 34 [(gogoproto.jsontag) = "up_best_fan_vv"];
string UpBestFanLiveMinute = 35 [(gogoproto.jsontag) = "up_best_fan_live_minute"];
string Like2Tids = 36 [(gogoproto.jsontag) = "like_2tids"];
string Like2subTids = 37 [(gogoproto.jsontag) = "like_2sub_tids"];
string WinRatio = 38 [(gogoproto.jsontag) = "win_ratio"];
int64 PlayDurationHourRep = 39 [(gogoproto.jsontag) = "play_duration_hour_rep"];
int64 LikeUpAvDurationRep = 40 [(gogoproto.jsontag) = "like_up_av_duration_rep"];
}