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 = [
"task.go",
"task_log.go",
],
importpath = "go-common/app/interface/main/laser/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,33 @@
package model
import (
xtime "go-common/library/time"
)
// Task is laser task
type Task struct {
ID int64 `json:"id"`
AdminID int64 `json:"admin_id"`
MID int64 `json:"mid"`
LogDate xtime.Time `json:"log_date"`
ContactEmail string `json:"contact_email"`
SourceType int `json:"source_type"`
Platform int `json:"platform"`
State int `json:"state"`
IsDeleted int `json:"is_deleted"`
CTime xtime.Time `json:"ctime"`
MTime xtime.Time `json:"mtime"`
}
const (
ALL_PLATFORM = iota
)
// TaskInfo is to set as value of memcache key(mid)
type TaskInfo struct {
MID int64
LogDate xtime.Time
SourceType int
Platform int
Empty bool
}

View File

@@ -0,0 +1,18 @@
package model
import (
xtime "go-common/library/time"
)
// TaskLog record the uploaded task details
type TaskLog struct {
ID int64 `json:"id"`
TaskID int64 `json:"task_id"`
MID int64 `json:"mid"`
Build string `json:"build"`
Platform int `json:"platform"`
TaskState int `json:"task_state"`
Reason string `json:"reason"`
CTime xtime.Time `json:"ctime"`
MTime xtime.Time `json:"mtime"`
}