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 = [
"model.go",
"point.go",
"search.go",
],
importpath = "go-common/app/admin/main/point/model",
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,49 @@
package model
// ArgPointHistory .
type ArgPointHistory struct {
Mid int64 `form:"mid"`
ChangeType int64 `form:"change_type"`
StartChangeTime int64 `form:"begin_time"`
EndChangeTime int64 `form:"end_time"`
BatchID string `form:"batch_id"`
RelationID string `form:"relation_id"`
PN int64 `form:"pn" default:"1"`
PS int64 `form:"ps" default:"50"`
}
// ArgID .
type ArgID struct {
ID int64 `form:"id" validate:"required,min=1,gte=1"`
}
// PageInfo common page info.
type PageInfo struct {
Count int `json:"count"`
CurrentPage int `json:"currentPage,omitempty"`
Item interface{} `json:"item"`
}
// point add suc.
const (
PointAddSuc = 1
)
// point change type
const (
ExchangeVip = iota + 1
Charge //充电
Contract //承包
PointSystem //系统发放
FYMReward //分院帽奖励
ExchangePendant //兑换挂件
MJActive //萌节活动
ReAcquirePointDedution //重复领取
)
// ArgPoint .
type ArgPoint struct {
Mid int64 `form:"mid" validate:"required,min=1,gte=1"`
Point int64 `form:"point"`
Remark string `form:"remark"`
}

View File

@@ -0,0 +1,38 @@
package model
import "time"
// PointConf .
type PointConf struct {
ID int64 `json:"id" form:"id"`
AppID int64 `json:"app_id" form:"app_id"`
Point int64 `json:"point" form:"point"`
Operator string `json:"operator" form:"operator"`
ChangeType int64 `json:"change_type" form:"change_type"`
Name string `json:"business_name" form:"name"`
Ctime time.Time `json:"-"`
Mtime time.Time `json:"mtime"`
}
// PointHistory .
type PointHistory struct {
ID int64 `json:"id"`
Mid int64 `json:"mid"`
OrderID string `json:"order_id"`
RelationID string `json:"relation_id"`
PointBalance float64 `json:"point_balance"`
ChangeTime string `json:"change_time"`
ChangeType int8 `json:"change_type"`
Remark string `json:"remark"`
Operator string `json:"operator"`
}
// AppInfo .
type AppInfo struct {
ID int64 `json:"_"`
Name string `json:"name"`
AppKey string `json:"app_key"`
PurgeURL string `json:"purge_url"`
Ctime time.Time `json:"-"`
Mtime time.Time `json:"mtime"`
}

View File

@@ -0,0 +1,16 @@
package model
// SearchPage struct.
type SearchPage struct {
PN int `json:"num"`
PS int `json:"size"`
Total int `json:"total"`
}
// SearchData search result detail.
type SearchData struct {
Order string `json:"order"`
Sort string `json:"sort"`
Page *SearchPage `json:"page"`
Result []*PointHistory `json:"result"`
}