Create & Init Project...
This commit is contained in:
29
app/admin/main/videoup/model/oversea/BUILD
Normal file
29
app/admin/main/videoup/model/oversea/BUILD
Normal 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 = ["oversea.go"],
|
||||
importpath = "go-common/app/admin/main/videoup/model/oversea",
|
||||
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"],
|
||||
)
|
84
app/admin/main/videoup/model/oversea/oversea.go
Normal file
84
app/admin/main/videoup/model/oversea/oversea.go
Normal file
@ -0,0 +1,84 @@
|
||||
package oversea
|
||||
|
||||
import (
|
||||
"go-common/library/time"
|
||||
)
|
||||
|
||||
const (
|
||||
StateOK = 1
|
||||
StateDeleted = 0
|
||||
)
|
||||
|
||||
type ArchiveRelation struct {
|
||||
ID int64 `json:"id" gorm:"column:id"`
|
||||
GroupID int64 `json:"policy_id" gorm:"column:policy_id"`
|
||||
Aid int64 `json:"aid" gorm:"column:aid"`
|
||||
}
|
||||
|
||||
func (ArchiveRelation) TableName() string {
|
||||
return "archive_relation"
|
||||
}
|
||||
|
||||
type PolicyGroup struct {
|
||||
ID int64 `json:"id" gorm:"column:id"`
|
||||
IsGlobal int8 `json:"is_global" gorm:"column:is_global"`
|
||||
Aid int64 `json:"aid" gorm:"column:aid"`
|
||||
Name string `json:"name" gorm:"column:name"`
|
||||
Type int8 `json:"type" gorm:"column:type"`
|
||||
State int8 `json:"state" gorm:"column:state"`
|
||||
UserName string `json:"username" gorm:"-"`
|
||||
UID int64 `json:"uid" gorm:"column:uid"`
|
||||
Remark string `json:"remark" gorm:"column:remark;size:140"`
|
||||
CTime time.Time `json:"ctime" gorm:"column:ctime"`
|
||||
MTime time.Time `json:"mtime" gorm:"column:mtime"`
|
||||
Items []*PolicyItem `json:"items" gorm:"-"`
|
||||
}
|
||||
|
||||
func (PolicyGroup) TableName() string {
|
||||
return "policy_group"
|
||||
}
|
||||
|
||||
type PolicyGroupData struct {
|
||||
Items []*PolicyGroup `json:"items"`
|
||||
Pager *Pager `json:"pager"`
|
||||
}
|
||||
|
||||
type Pager struct {
|
||||
Num int64 `json:"num"`
|
||||
Size int64 `json:"size"`
|
||||
Total int64 `json:"total"`
|
||||
}
|
||||
|
||||
type PolicyItem struct {
|
||||
ID int64 `json:"id" gorm:"column:id"`
|
||||
GroupID int64 `json:"group_id" gorm:"column:group_id"`
|
||||
PlayAuth int8 `json:"play_auth" gorm:"column:play_auth"`
|
||||
DownAuth int8 `json:"down_auth" gorm:"column:down_auth"`
|
||||
AreaID string `json:"area_id" gorm:"column:area_id"`
|
||||
ZoneID string `json:"zone_id" gorm:"column:zone_id"`
|
||||
State int8 `json:"state" gorm:"column:state"`
|
||||
}
|
||||
|
||||
func (PolicyItem) TableName() string {
|
||||
return "policy_item"
|
||||
}
|
||||
|
||||
type PolicyParams struct {
|
||||
ID int64 `json:"id"`
|
||||
DownAuth int8 `json:"down_auth"`
|
||||
PlayAuth int8 `json:"play_auth"`
|
||||
AreaIds []int64 `json:"area_id"`
|
||||
}
|
||||
|
||||
type Zone struct {
|
||||
ID int64 `json:"id"`
|
||||
Name string `json:"name"`
|
||||
Pid int64 `json:"pid"`
|
||||
Ppid int64 `json:"ppid"`
|
||||
ZoneID int64 `json:"zone_id"`
|
||||
Status int8 `json:"status"`
|
||||
}
|
||||
|
||||
func (Zone) TableName() string {
|
||||
return "locality"
|
||||
}
|
Reference in New Issue
Block a user