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 = [
"operation.go",
"promote.go",
],
importpath = "go-common/app/interface/main/web-show/model/operation",
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,28 @@
package operation
// Types
var (
Types = []string{
"uptool",
"promote",
}
)
// Operation struct
type Operation struct {
ID int64 `json:"-"`
Type string `json:"-"`
Message string `json:"message"`
Link string `json:"link"`
Pic string `json:"pic,omitempty"`
Ads int `json:"ads,omitempty"`
Rank int `json:"rank"`
Aid int64 `json:"-"`
}
// ArgOp ArgOp
type ArgOp struct {
Tp string `form:"tp"`
Count int `form:"count" validate:"min=0"`
Rank int `form:"rank" validate:"min=0"`
}

View File

@@ -0,0 +1,16 @@
package operation
import "go-common/app/service/main/archive/api"
// Promote strcuct
type Promote struct {
IsAd int8 `json:"is_ad"`
Archive *api.Arc `json:"archive"`
}
// ArgPromote strcuct
type ArgPromote struct {
Tp string `form:"tp" validate:"required"`
Count int `form:"count" validate:"min=0"`
Rank int `form:"rank" validate:"min=0"`
}