Create & Init Project...
This commit is contained in:
47
app/admin/main/activity/model/BUILD
Normal file
47
app/admin/main/activity/model/BUILD
Normal file
@ -0,0 +1,47 @@
|
||||
package(default_visibility = ["//visibility:public"])
|
||||
|
||||
load(
|
||||
"@io_bazel_rules_go//go:def.bzl",
|
||||
"go_test",
|
||||
"go_library",
|
||||
)
|
||||
|
||||
go_test(
|
||||
name = "go_default_test",
|
||||
srcs = ["model_test.go"],
|
||||
embed = [":go_default_library"],
|
||||
rundir = ".",
|
||||
tags = ["automanaged"],
|
||||
)
|
||||
|
||||
go_library(
|
||||
name = "go_default_library",
|
||||
srcs = [
|
||||
"archive.go",
|
||||
"bws.go",
|
||||
"likes.go",
|
||||
"match.go",
|
||||
"subject.go",
|
||||
],
|
||||
importpath = "go-common/app/admin/main/activity/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",
|
||||
"//app/admin/main/activity/model/kfc:all-srcs",
|
||||
],
|
||||
tags = ["automanaged"],
|
||||
visibility = ["//visibility:public"],
|
||||
)
|
6
app/admin/main/activity/model/archive.go
Normal file
6
app/admin/main/activity/model/archive.go
Normal file
@ -0,0 +1,6 @@
|
||||
package model
|
||||
|
||||
// ArchiveParam .
|
||||
type ArchiveParam struct {
|
||||
Aids []int64 `json:"aids" form:"aids,split" validate:"min=1,max=30,dive,gt=0"`
|
||||
}
|
108
app/admin/main/activity/model/bws.go
Normal file
108
app/admin/main/activity/model/bws.go
Normal file
@ -0,0 +1,108 @@
|
||||
package model
|
||||
|
||||
import (
|
||||
"time"
|
||||
)
|
||||
|
||||
// ActBws def.
|
||||
type ActBws struct {
|
||||
ID int64 `json:"id" form:"id"`
|
||||
Name string `json:"name" form:"name"`
|
||||
Image string `json:"image" form:"image"`
|
||||
Dic string `json:"dic" form:"dic"`
|
||||
Del int8 `json:"del" form:"del"`
|
||||
Ctime time.Time `json:"ctime"`
|
||||
Mtime time.Time `json:"mtime"`
|
||||
}
|
||||
|
||||
// ActBwsAchievement def.
|
||||
type ActBwsAchievement struct {
|
||||
ID int64 `json:"id" form:"id"`
|
||||
Name string `json:"name" form:"name"`
|
||||
Icon string `json:"icon" form:"icon"`
|
||||
Dic string `json:"dic" form:"dic"`
|
||||
Image string `json:"image" form:"image"`
|
||||
LinkType int64 `json:"link_type" form:"link_type"`
|
||||
Unlock int64 `json:"unlock" form:"unlock"`
|
||||
BID int64 `json:"bid" gorm:"column:bid" form:"bid"`
|
||||
IconBig string `json:"icon_big" form:"icon_big"`
|
||||
IconActive string `json:"icon_active" form:"icon_active"`
|
||||
IconActiveBig string `json:"icon_active_big" form:"icon_active_big"`
|
||||
Award int8 `json:"award" form:"award"`
|
||||
Ctime time.Time `json:"ctime"`
|
||||
Mtime time.Time `json:"mtime"`
|
||||
Del int8 `json:"del" form:"del"`
|
||||
SuitID int64 `json:"suit_id" gorm:"column:suit_id" form:"suit_id"`
|
||||
}
|
||||
|
||||
// ActBwsField def.
|
||||
type ActBwsField struct {
|
||||
ID int64 `json:"id" form:"id"`
|
||||
Name string `json:"name" form:"name"`
|
||||
Area string `json:"area" form:"area"`
|
||||
BID int64 `json:"bid" gorm:"column:bid" form:"bid"`
|
||||
Del int8 `json:"del" form:"del"`
|
||||
Ctime time.Time `json:"ctime"`
|
||||
Mtime time.Time `json:"mtime"`
|
||||
}
|
||||
|
||||
// ActBwsPoint def.
|
||||
type ActBwsPoint struct {
|
||||
ID int64 `json:"id" form:"id"`
|
||||
Name string `json:"name" form:"name"`
|
||||
Icon string `json:"icon" form:"icon"`
|
||||
FID int64 `json:"fid" gorm:"column:fid" form:"fid"`
|
||||
Ower int64 `json:"ower" gorm:"column:ower" form:"ower"`
|
||||
Image string `json:"image" form:"image"`
|
||||
Unlocked int64 `json:"unlocked" form:"unlocked"`
|
||||
LoseUnlocked int64 `json:"lose_unlocked" form:"lose_unlocked"`
|
||||
LockType int64 `json:"lock_type" form:"lock_type"`
|
||||
Dic string `json:"dic" form:"dic"`
|
||||
Rule string `json:"rule" form:"rule"`
|
||||
BID int64 `json:"bid" gorm:"column:bid" form:"bid"`
|
||||
OtherIP string `json:"other_ip" gorm:"column:other_ip" form:"other_ip"`
|
||||
Del int8 `json:"del" form:"del"`
|
||||
Ctime time.Time `json:"ctime"`
|
||||
Mtime time.Time `json:"mtime"`
|
||||
}
|
||||
|
||||
// ActBwsUserAchievement def.
|
||||
type ActBwsUserAchievement struct {
|
||||
ID int64 `json:"id" form:"id"`
|
||||
MID int64 `json:"mid" gorm:"column:mid" form:"mid"`
|
||||
AID int64 `json:"aid" gorm:"column:aid" form:"aid"`
|
||||
BID int64 `json:"bid" gorm:"column:bid" form:"bid"`
|
||||
Key string `json:"key" form:"key"`
|
||||
Del int8 `json:"del" form:"del"`
|
||||
Ctime time.Time `json:"ctime"`
|
||||
Mtime time.Time `json:"mtime"`
|
||||
}
|
||||
|
||||
// ActBwsUserPoint def.
|
||||
type ActBwsUserPoint struct {
|
||||
ID int64 `json:"id" form:"id"`
|
||||
MID int64 `json:"mid" gorm:"column:mid" form:"mid"`
|
||||
PID int64 `json:"pid" gorm:"column:pid" form:"pid"`
|
||||
BID int64 `json:"bid" gorm:"column:bid" form:"bid"`
|
||||
Key string `json:"key" form:"key"`
|
||||
Points int64 `json:"points" form:"points"`
|
||||
Del int8 `json:"del" form:"del"`
|
||||
Ctime time.Time `json:"ctime"`
|
||||
Mtime time.Time `json:"mtime"`
|
||||
}
|
||||
|
||||
// ActBwsUser def.
|
||||
type ActBwsUser struct {
|
||||
ID int64 `json:"id" form:"id"`
|
||||
MID int64 `json:"mid" gorm:"column:mid" form:"mid"`
|
||||
BID int64 `json:"bid" gorm:"column:bid" form:"bid"`
|
||||
Key string `json:"key" form:"key"`
|
||||
Del int8 `json:"del" form:"del"`
|
||||
Ctime time.Time `json:"ctime"`
|
||||
Mtime time.Time `json:"mtime"`
|
||||
}
|
||||
|
||||
// TableName ActBws def.
|
||||
func (ActBws) TableName() string {
|
||||
return "act_bws"
|
||||
}
|
29
app/admin/main/activity/model/kfc/BUILD
Normal file
29
app/admin/main/activity/model/kfc/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 = ["kfc.go"],
|
||||
importpath = "go-common/app/admin/main/activity/model/kfc",
|
||||
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"],
|
||||
)
|
28
app/admin/main/activity/model/kfc/kfc.go
Normal file
28
app/admin/main/activity/model/kfc/kfc.go
Normal file
@ -0,0 +1,28 @@
|
||||
package kfc
|
||||
|
||||
import "go-common/library/time"
|
||||
|
||||
// ListParams .
|
||||
type ListParams struct {
|
||||
CouponCode string `form:"coupon_code"`
|
||||
Mid int64 `form:"mid"`
|
||||
Pn int `form:"pn" default:"0" validate:"min=0"`
|
||||
Ps int `form:"ps" default:"15" validate:"min=1"`
|
||||
}
|
||||
|
||||
//BnjKfcCoupon def
|
||||
type BnjKfcCoupon struct {
|
||||
ID int64 `json:"id" gorm:"column:id"`
|
||||
Mid int64 `json:"mid" gorm:"column:mid"`
|
||||
CouponCode string `json:"coupon_code" gorm:"column:coupon_code"`
|
||||
Desc string `json:"desc" gorm:"column:desc"`
|
||||
State int `json:"state" gorm:"column:state"`
|
||||
DeleteTime time.Time `json:"delete_time" gorm:"column:delete_time" time_format:"2006-01-02 15:04:05"`
|
||||
Ctime time.Time `json:"ctime" gorm:"column:ctime" time_format:"2006-01-02 15:04:05"`
|
||||
Mtime time.Time `json:"mtime" gorm:"column:mtime" time_format:"2006-01-02 15:04:05"`
|
||||
}
|
||||
|
||||
// TableName BnjKfcCoupon def
|
||||
func (BnjKfcCoupon) TableName() string {
|
||||
return "bnj_kfc_coupon"
|
||||
}
|
143
app/admin/main/activity/model/likes.go
Normal file
143
app/admin/main/activity/model/likes.go
Normal file
@ -0,0 +1,143 @@
|
||||
package model
|
||||
|
||||
import (
|
||||
xtime "go-common/library/time"
|
||||
)
|
||||
|
||||
// LikesParam def.
|
||||
type LikesParam struct {
|
||||
Sid int64 `form:"sid" validate:"min=1"`
|
||||
Mid int64 `form:"mid"`
|
||||
Wid int64 `form:"wid"`
|
||||
Page int `form:"page" default:"1" validate:"min=1"`
|
||||
PageSize int `form:"pagesize" default:"15" validate:"min=1"`
|
||||
States []int `form:"state,split"`
|
||||
}
|
||||
|
||||
// AddLikes .
|
||||
type AddLikes struct {
|
||||
DealType string `form:"deal_type" validate:"required"`
|
||||
Wid int64 `form:"wid"`
|
||||
Sid int64 `form:"sid" validate:"min=1"`
|
||||
Type int `form:"type"`
|
||||
Mid int64 `form:"mid"`
|
||||
State int `form:"state"`
|
||||
Plat int `form:"plat"`
|
||||
Device int `form:"device"`
|
||||
}
|
||||
|
||||
// UpReply .
|
||||
type UpReply struct {
|
||||
State int `form:"state"`
|
||||
Reply string `form:"reply"`
|
||||
IDs []int64 `form:"ids,split" validate:"min=1,max=50"`
|
||||
}
|
||||
|
||||
// UpWid .
|
||||
type UpWid struct {
|
||||
Sid int64 `form:"sid" validate:"min=1"`
|
||||
Wid int64 `form:"wid" validate:"min=1"`
|
||||
State int `form:"state"`
|
||||
}
|
||||
|
||||
// BatchLike .
|
||||
type BatchLike struct {
|
||||
Sid int64 `form:"sid" validate:"min=1"`
|
||||
Wid []int64 `form:"wid,split" validate:"min=1,max=200,dive,gt=0"`
|
||||
Mid int64 `form:"mid"`
|
||||
Type int `form:"type"`
|
||||
}
|
||||
|
||||
// AddPic .
|
||||
type AddPic struct {
|
||||
Sid int64 `form:"sid" validate:"min=1"`
|
||||
Type int `form:"type"`
|
||||
Mid int64 `form:"mid"`
|
||||
Wid int64 `form:"wid"`
|
||||
Plat int `form:"plat"`
|
||||
Device int `form:"device"`
|
||||
Image string `form:"image"`
|
||||
Message string `form:"message" validate:"required,max=450,min=1"`
|
||||
Link string `form:"link"`
|
||||
}
|
||||
|
||||
// UpLike .
|
||||
type UpLike struct {
|
||||
Type int `form:"type"`
|
||||
Mid int64 `form:"mid"`
|
||||
Wid int64 `form:"wid"`
|
||||
State int `form:"state"`
|
||||
StickTop int `form:"stick_top"`
|
||||
Lid int64 `form:"lid" validate:"min=1"`
|
||||
Message string `form:"message"`
|
||||
Reply string `form:"reply"`
|
||||
Link string `form:"link"`
|
||||
Image string `form:"image"`
|
||||
}
|
||||
|
||||
// ActivityAVInfo active_id -> avid
|
||||
type ActivityAVInfo struct {
|
||||
ActivityID int64 `json:"mission_id"`
|
||||
AVID int64 `json:"id"`
|
||||
MID int64 `json:"mid"`
|
||||
Category int `json:"typeid"`
|
||||
TagID int64 `json:"-"`
|
||||
Ratio int `json:"-"`
|
||||
}
|
||||
|
||||
// LikeContent def
|
||||
type LikeContent struct {
|
||||
ID int64 `json:"id" form:"id" gorm:"column:id"`
|
||||
Message string `json:"message" form:"message"`
|
||||
IP int64 `json:"ip" form:"ip" gorm:"column:ip"`
|
||||
Plat int `json:"plat" form:"plat"`
|
||||
Device int `json:"device" form:"device"`
|
||||
Ctime xtime.Time `json:"ctime" form:"ctime" time_format:"2006-01-02 15:04:05"`
|
||||
Mtime xtime.Time `json:"mtime" form:"mtime" time_format:"2006-01-02 15:04:05"`
|
||||
Image string `json:"image" form:"image"`
|
||||
Reply string `json:"reply" form:"reply"`
|
||||
Link string `json:"link" form:"link"`
|
||||
ExName string `json:"ex_name" form:"ex_name"`
|
||||
IPv6 []byte `json:"ipv6" gorm:"column:ipv6"`
|
||||
}
|
||||
|
||||
//ActLikeLog def
|
||||
type ActLikeLog struct {
|
||||
ID int64 `json:"id" form:"id" gorm:"column:id"`
|
||||
Lid int64 `json:"lid" form:"lid" gorm:"column:lid"`
|
||||
User string `json:"user" form:"user" gorm:"column:user"`
|
||||
State int64 `json:"state" form:"state" gorm:"column:state"`
|
||||
Ctime xtime.Time `json:"ctime" form:"ctime" gorm:"column:ctime" time_format:"2006-01-02 15:04:05"`
|
||||
Mtime xtime.Time `json:"mtime" form:"mtime" gorm:"column:mtime" time_format:"2006-01-02 15:04:05"`
|
||||
}
|
||||
|
||||
// LikesRes .
|
||||
type LikesRes struct {
|
||||
Likes map[int64]*Like `json:"likes"`
|
||||
PageRes
|
||||
}
|
||||
|
||||
// MusicRes .
|
||||
type MusicRes struct {
|
||||
Code int `json:"code"`
|
||||
Data map[int64]struct {
|
||||
CoverURL string `json:"coverUrl"`
|
||||
Duration string `json:"duration"`
|
||||
Categorie string `json:"categorie"`
|
||||
Intro string `json:"intro"`
|
||||
Mid int64 `json:"mid"`
|
||||
Title string `json:"title"`
|
||||
SongID int64 `json:"songId"`
|
||||
PlayURL []string `json:"playUrl"`
|
||||
}
|
||||
}
|
||||
|
||||
// TableName ActLikeLog def
|
||||
func (ActLikeLog) TableName() string {
|
||||
return "act_like_log"
|
||||
}
|
||||
|
||||
// TableName LikeContent def
|
||||
func (LikeContent) TableName() string {
|
||||
return "like_content"
|
||||
}
|
44
app/admin/main/activity/model/match.go
Normal file
44
app/admin/main/activity/model/match.go
Normal file
@ -0,0 +1,44 @@
|
||||
package model
|
||||
|
||||
import (
|
||||
"time"
|
||||
)
|
||||
|
||||
// ActMatchs def.
|
||||
type ActMatchs struct {
|
||||
ID int64 `json:"id" form:"id"`
|
||||
Name string `json:"name" form:"name"`
|
||||
URL string `json:"url" form:"url"`
|
||||
Cover string `json:"cover" form:"cover"`
|
||||
SID int64 `json:"sid" form:"sid" gorm:"column:sid"`
|
||||
MaxStake int64 `json:"max_stake" form:"max_stake"`
|
||||
Stake int8 `json:"stake" form:"stake"`
|
||||
Status int8 `json:"status" form:"status"`
|
||||
Ctime time.Time `json:"ctime"`
|
||||
Mtime time.Time `json:"mtime"`
|
||||
}
|
||||
|
||||
// ActMatchsObject def.
|
||||
type ActMatchsObject struct {
|
||||
ID int64 `json:"id" form:"id"`
|
||||
HomeName string `json:"home_name" form:"home_name"`
|
||||
HomeLogo string `json:"home_logo" form:"home_logo"`
|
||||
HomeScore int64 `json:"home_score" form:"home_score"`
|
||||
AwayName string `json:"away_name" form:"away_name"`
|
||||
AwayLogo string `json:"away_logo" form:"away_logo"`
|
||||
AwayScore int64 `json:"away_score" form:"away_score"`
|
||||
SID int64 `json:"sid" gorm:"column:sid" form:"sid"`
|
||||
MatchID int64 `json:"match_id" form:"match_id"`
|
||||
GameStime time.Time `json:"game_stime" form:"game_stime" time_format:"2006-01-02 15:04:05"`
|
||||
Stime time.Time `json:"stime" form:"stime" time_format:"2006-01-02 15:04:05"`
|
||||
Etime time.Time `json:"etime" form:"etime" time_format:"2006-01-02 15:04:05"`
|
||||
Ctime time.Time `json:"ctime"`
|
||||
Mtime time.Time `json:"mtime"`
|
||||
Result int8 `json:"result" form:"result"`
|
||||
Status int8 `json:"status" form:"status"`
|
||||
}
|
||||
|
||||
// TableName ActMatchsObject def.
|
||||
func (ActMatchsObject) TableName() string {
|
||||
return "act_matchs_object"
|
||||
}
|
9
app/admin/main/activity/model/model_test.go
Normal file
9
app/admin/main/activity/model/model_test.go
Normal file
@ -0,0 +1,9 @@
|
||||
package model
|
||||
|
||||
import "testing"
|
||||
|
||||
func Test_Funcs(t *testing.T) {
|
||||
act := new(ActMatchsObject)
|
||||
s := act.TableName()
|
||||
t.Logf("tablename %s", s)
|
||||
}
|
192
app/admin/main/activity/model/subject.go
Normal file
192
app/admin/main/activity/model/subject.go
Normal file
@ -0,0 +1,192 @@
|
||||
package model
|
||||
|
||||
import (
|
||||
xtime "go-common/library/time"
|
||||
)
|
||||
|
||||
// VIDEO actiivty types .
|
||||
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
|
||||
)
|
||||
|
||||
// SidSub def
|
||||
type SidSub struct {
|
||||
Type int `form:"type" validate:"required"`
|
||||
Lids []int64 `form:"lids,split" validate:"max=50,min=1,dive,min=1"`
|
||||
}
|
||||
|
||||
// ListSub def
|
||||
type ListSub struct {
|
||||
Page int `form:"page" default:"1" validate:"min=1"`
|
||||
PageSize int `form:"pagesize" default:"15" validate:"min=1"`
|
||||
Keyword string `form:"keyword"`
|
||||
States []int `form:"state,split" default:"0"`
|
||||
Types []int `form:"type,split" default:"0"`
|
||||
Sctime int64 `form:"sctime"`
|
||||
Ectime int64 `form:"ectime"`
|
||||
}
|
||||
|
||||
// SubListRes .
|
||||
type SubListRes struct {
|
||||
List []*ActSubject `json:"list"`
|
||||
Page *PageRes `json:"page"`
|
||||
}
|
||||
|
||||
// PageRes .
|
||||
type PageRes struct {
|
||||
Num int `json:"num"`
|
||||
Size int `json:"size"`
|
||||
Total int64 `json:"total"`
|
||||
}
|
||||
|
||||
// AddList def
|
||||
type AddList struct {
|
||||
ActSubject
|
||||
Protocol string `form:"protocol"`
|
||||
Types string `form:"types"`
|
||||
Pubtime xtime.Time `form:"pubtime" time_format:"2006-01-02 15:04:05"`
|
||||
Deltime xtime.Time `form:"deltime" time_format:"2006-01-02 15:04:05"`
|
||||
Editime xtime.Time `form:"editime" time_format:"2006-01-02 15:04:05"`
|
||||
Tags string `form:"tags"`
|
||||
Interval int `form:"interval"`
|
||||
Tlimit int `form:"tlimit"`
|
||||
Ltime int `form:"ltime"`
|
||||
Hot int `form:"hot"`
|
||||
BgmID int64 `form:"bgm_id"`
|
||||
PasterID int64 `form:"paster_id"`
|
||||
Oids string `from:"oids"`
|
||||
ScreenSet int `form:"screen_set" default:"1"`
|
||||
}
|
||||
|
||||
//ActSubjectProtocol def
|
||||
type ActSubjectProtocol struct {
|
||||
ID int64 `json:"id" form:"id" gorm:"column:id"`
|
||||
Sid int64 `json:"sid" form:"sid"`
|
||||
Protocol string `json:"protocol" form:"protocol"`
|
||||
Mtime xtime.Time `json:"mtime" form:"mtime" time_format:"2006-01-02 15:04:05"`
|
||||
Ctime xtime.Time `json:"ctime" form:"ctime" time_format:"2006-01-02 15:04:05"`
|
||||
Types string `json:"types" form:"types"`
|
||||
Tags string `json:"tags" form:"tags"`
|
||||
Hot int `json:"hot" form:"hot"`
|
||||
Pubtime xtime.Time `json:"pubtime" form:"pubtime" time_format:"2006-01-02 15:04:05"`
|
||||
Deltime xtime.Time `json:"deltime" form:"deltime" time_format:"2006-01-02 15:04:05"`
|
||||
Editime xtime.Time `json:"editime" form:"editime" time_format:"2006-01-02 15:04:05"`
|
||||
BgmID int64 `json:"bgm_id" form:"bgm_id" gorm:"column:bgm_id"`
|
||||
PasterID int64 `json:"paster_id" form:"paster_id" gorm:"column:paster_id"`
|
||||
Oids string `json:"oids" form:"oids" gorm:"column:oids"`
|
||||
ScreenSet int `json:"screen_set" form:"screen_set" gorm:"column:screen_set"`
|
||||
}
|
||||
|
||||
//ActTimeConfig def
|
||||
type ActTimeConfig struct {
|
||||
ID int64 `json:"id" form:"id" gorm:"column:id"`
|
||||
Sid int64 `json:"sid" form:"sid"`
|
||||
Interval int `json:"interval" form:"interval"`
|
||||
Ctime xtime.Time `json:"ctime" form:"ctime" time_format:"2006-01-02 15:04:05"`
|
||||
Mtime xtime.Time `json:"mtime" form:"mtime" time_format:"2006-01-02 15:04:05"`
|
||||
Tlimit int `json:"tlimit" form:"tlimit"`
|
||||
Ltime int `json:"ltime" form:"ltime"`
|
||||
}
|
||||
|
||||
// ActSubject def.
|
||||
type ActSubject struct {
|
||||
ID int64 `json:"id,omitempty" form:"id" gorm:"column:id"`
|
||||
Oid int64 `json:"oid,omitempty" form:"oid"`
|
||||
Type int `json:"type,omitempty" form:"type"`
|
||||
State int `json:"state,omitempty" form:"state"`
|
||||
Level int `json:"level,omitempty" form:"level"`
|
||||
Flag int64 `json:"flag,omitempty" form:"flag"`
|
||||
Rank int64 `json:"rank,omitempty" form:"rank"`
|
||||
Stime xtime.Time `json:"stime,omitempty" form:"stime" time_format:"2006-01-02 15:04:05"`
|
||||
Etime xtime.Time `json:"etime,omitempty" form:"etime" time_format:"2006-01-02 15:04:05"`
|
||||
Ctime xtime.Time `json:"ctime,omitempty" form:"ctime" time_format:"2006-01-02 15:04:05"`
|
||||
Mtime xtime.Time `json:"mtime,omitempty" form:"mtime" time_format:"2006-01-02 15:04:05"`
|
||||
Lstime xtime.Time `json:"lstime,omitempty" form:"lstime" time_format:"2006-01-02 15:04:05"`
|
||||
Letime xtime.Time `json:"letime,omitempty" form:"letime" time_format:"2006-01-02 15:04:05"`
|
||||
Uetime xtime.Time `json:"uetime,omitempty" form:"uetime" time_format:"2006-01-02 15:04:05"`
|
||||
Ustime xtime.Time `json:"ustime,omitempty" form:"ustime" time_format:"2006-01-02 15:04:05"`
|
||||
Name string `json:"name,omitempty" form:"name"`
|
||||
Author string `json:"author,omitempty" form:"author"`
|
||||
ActURL string `json:"act_url,omitempty" form:"act_url"`
|
||||
Cover string `json:"cover,omitempty" form:"cover"`
|
||||
Dic string `json:"dic,omitempty" form:"dic"`
|
||||
H5Cover string `json:"h5_cover,omitempty" form:"h5_cover"`
|
||||
LikeLimit int `json:"like_limit" form:"like_limit"`
|
||||
AndroidURL string `json:"android_url"`
|
||||
IosURL string `json:"ios_url"`
|
||||
}
|
||||
|
||||
// ActSubjectResult .
|
||||
type ActSubjectResult struct {
|
||||
*ActSubject
|
||||
Aids []int64 `json:"aids,omitempty"`
|
||||
}
|
||||
|
||||
// Like def.
|
||||
type Like struct {
|
||||
ID int64 `json:"id" form:"id" gorm:"column:id"`
|
||||
Sid int64 `json:"sid" form:"sid"`
|
||||
Type int `json:"type" form:"type"`
|
||||
Mid int64 `json:"mid" form:"mid"`
|
||||
Wid int64 `json:"wid" form:"wid"`
|
||||
State int `json:"state" form:"state"`
|
||||
StickTop int `json:"stick_top" form:"stick_top"`
|
||||
Ctime xtime.Time `json:"ctime" form:"ctime" time_format:"2006-01-02 15:04:05"`
|
||||
Mtime xtime.Time `json:"mtime" form:"mtime" time_format:"2006-01-02 15:04:05"`
|
||||
Object interface{} `json:"object,omiempty" gorm:"-"`
|
||||
Like int64 `json:"like,omiempty" gorm:"-"`
|
||||
}
|
||||
|
||||
//LikeAction def
|
||||
type LikeAction struct {
|
||||
ID int64 `form:"id" gorm:"column:id"`
|
||||
Lid int64 `form:"lid"`
|
||||
Mid int64 `form:"mid"`
|
||||
Action int64 `form:"action"`
|
||||
Ctime xtime.Time `form:"ctime" time_format:"2006-01-02 15:04:05"`
|
||||
Mtime xtime.Time `form:"mtime" time_format:"2006-01-02 15:04:05"`
|
||||
Sid int64 `form:"sid"`
|
||||
IP int64 `form:"ip" gorm:"column:ip"`
|
||||
}
|
||||
|
||||
// TableName LikeAction def
|
||||
func (LikeAction) TableName() string {
|
||||
return "like_action"
|
||||
}
|
||||
|
||||
// TableName ActMatchs def.
|
||||
func (ActSubject) TableName() string {
|
||||
return "act_subject"
|
||||
}
|
||||
|
||||
// TableName Likes def
|
||||
func (Like) TableName() string {
|
||||
return "likes"
|
||||
}
|
||||
|
||||
// TableName ActSubjectProtocol def
|
||||
func (ActSubjectProtocol) TableName() string {
|
||||
return "act_subject_protocol"
|
||||
}
|
||||
|
||||
// TableName ActTimeConfig def
|
||||
func (ActTimeConfig) TableName() string {
|
||||
return "act_time_config"
|
||||
}
|
Reference in New Issue
Block a user