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,43 @@
package(default_visibility = ["//visibility:public"])
load(
"@io_bazel_rules_go//go:def.bzl",
"go_library",
)
go_library(
name = "go_default_library",
srcs = [
"account.go",
"activity.go",
"archive_stat.go",
"av_breach.go",
"banner.go",
"exchange.go",
"income.go",
"newbie.go",
"notice.go",
"special_award.go",
"up.go",
"up_bill.go",
"withdraw.go",
],
importpath = "go-common/app/interface/main/growup/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,41 @@
package model
// ActUpInfo account up info
type ActUpInfo struct {
Nickname string `json:"nickname"`
Face string `json:"face"`
}
// Account Account
type Account struct {
Mid int64 `json:"mid"`
Name string `json:"name"`
Sex string `json:"sex"`
Face string `json:"face"`
Sign string `json:"sign"`
Rank int64 `json:"rank"`
}
// AccountInfosResult Account info result
type AccountInfosResult struct {
Code int `json:"code"`
Data map[int64]*Account `json:"data"`
Message string `json:"message"`
TTL int64 `json:"ttl"`
}
// UpIdentify up identify
type UpIdentify struct {
Article int `json:"article"`
Pic int `json:"pic"`
Archive int `json:"archive"`
Blink int `json:"blink"`
}
// UperInfosResult info result
type UperInfosResult struct {
Code int `json:"code"`
Data map[string]*UpIdentify `json:"data"`
Message string `json:"message"`
TTL int64 `json:"ttl"`
}

View File

@@ -0,0 +1,43 @@
package model
import (
"go-common/library/time"
)
// CActivity creative activity
type CActivity struct {
ID int64 `json:"id"`
Name string `json:"name"`
SignedStart time.Time `json:"-"`
SignedEnd time.Time `json:"-"`
SignUpStart time.Time `json:"-"`
SignUpEnd time.Time `json:"-"`
SignUp int `json:"sign_up"`
SignUpState int `json:"sign_up_state"` // 0可以报名,1已报名,2已获奖,3不能报名
WinType int `json:"win_type"`
ProgressStart time.Time `json:"-"`
ProgressEnd time.Time `json:"-"`
ProgressState int `json:"progress_state"` // 展示状态 0不展示 1展示
ProgressSync int `json:"progress_sync"`
UpdatePage int `json:"-"`
BonusQuery int `json:"bonus_query"`
BonusQueryStart time.Time `json:"-"`
BonusQueryEnd time.Time `json:"-"`
Background string `json:"background"`
WinDesc string `json:"win_desc"`
UnwinDesc string `json:"unwin_desc"`
Details string `json:"details"`
Enrollment int `json:"enrollment"`
WinNum int `json:"win_num"`
Ranking []*ActUpInfo `json:"ranking"`
}
// UpBonus up bonus
type UpBonus struct {
MID int64
ActivityID int64
Nickname string
Rank int
State int
SignUpTime time.Time
}

View File

@@ -0,0 +1,12 @@
package model
// UpBaseStat for up base.
type UpBaseStat struct {
View int64 `json:"view"`
Reply int64 `json:"reply"`
Dm int64 `json:"dm"`
Fans int64 `json:"fans"`
Fav int64 `json:"fav"`
Like int64 `json:"like"`
Share int64 `json:"share"`
}

View File

@@ -0,0 +1,16 @@
package model
import (
"go-common/library/time"
)
// AvBreach av breach
type AvBreach struct {
AvID int64 `json:"archive_id"`
MID int64 `json:"mid"`
CDate time.Time `json:"cdate"`
Money int64 `json:"money"`
CType int `json:"ctype"`
Reason string `json:"reason"`
Title string `json:"title"`
}

View File

@@ -0,0 +1,16 @@
package model
import (
"go-common/library/time"
)
// Banner banner
type Banner struct {
ID int64 `json:"id"`
Image string `json:"image"`
Link string `json:"link"`
StartAt time.Time `json:"start_at"`
EndAt time.Time `json:"end_at"`
CTime time.Time `json:"-"`
MTime time.Time `json:"-"`
}

View File

@@ -0,0 +1,32 @@
package model
import (
"go-common/library/time"
)
// GoodsInfo goods info
type GoodsInfo struct {
ID int64 `json:"-"`
ProductID string `json:"product_id"`
ResourceID int64 `json:"-"`
GoodsType int `json:"goods_type"`
Discount int `json:"discount"`
IsDisplay int `json:"-"`
DisplayOnTime time.Time `json:"-"`
ProductName string `json:"product_name"` // 商品名称
OriginPrice int64 `json:"origin_price"` // 实时成本, 单位分
CurrentPrice int64 `json:"current_price"` // 实时售价, 单位分
Month int32 `json:"month"` //有效期
}
// GoodsOrder goods order
type GoodsOrder struct {
MID int64 `json:"-"`
OrderNo string `json:"-"`
OrderTime time.Time `json:"order_time"`
GoodsType int `json:"-"`
GoodsID string `json:"-"`
GoodsName string `json:"goods_name"`
GoodsPrice int64 `json:"goods_price"`
GoodsCost int64 `json:"goods_cost"`
}

View File

@@ -0,0 +1,83 @@
package model
import (
"go-common/library/time"
)
// ArchiveIncome av income
type ArchiveIncome struct {
ID int64 `json:"id"`
ArchiveID int64 `json:"archive_id"`
Avs []int64 `json:"avs,omitempty"`
MID int64 `json:"mid"`
Income int64 `json:"income"`
MonthIncome int64 `json:"month_income"`
TotalIncome int64 `json:"total_income"`
Breach *AvBreach `json:"breach"`
Title string `json:"title"`
Icon string `json:"icon"`
Date time.Time `json:"date"`
CTime time.Time `json:"ctime"`
MTime time.Time `json:"mtime"`
IsDeleted int `json:"-"`
}
// Blacklist black list
type Blacklist struct {
ID int64 `json:"id" gorm:"column:id"`
AvID int64 `json:"av_id" gorm:"column:av_id"`
MID int64 `json:"mid" gorm:"column:mid"`
Reason int `json:"reason" gorm:"column:reason"`
CType int `json:"ctype" gorm:"column:ctype"`
HasSigned int `json:"has_signed" gorm:"column:has_signed"`
Nickname string `json:"nickname" gorm:"column:nickname"`
CTime time.Time `json:"ctime" gorm:"column:ctime"`
MTime time.Time `json:"mtime" gorm:"column:mtime"`
IsDeleted int `json:"-"`
}
// ArchiveRes archive response
type ArchiveRes struct {
Code int `json:"code"`
Data map[string]*Archive `json:"data"`
Message string `json:"message"`
}
// Archive archive
type Archive struct {
AID int64 `json:"aid"`
Title string `json:"title"`
}
// TagInfo tag_info
type TagInfo struct {
ID int64
Radio int64
Icon string
}
// UpIncome up_income
type UpIncome struct {
ID int64
MID int64
Income int64
AvIncome int64
ColumnIncome int64
BgmIncome int64
BaseIncome int64
AvBaseIncome int64
ColumnBaseIncome int64
BgmBaseIncome int64
TotalIncome int64
Date time.Time
}
// UpIncomeStat for up daily income analytics
type UpIncomeStat struct {
MID int64 `json:"-"`
Income int64 `json:"income"`
BaseIncome int64 `json:"base_income"`
ExtraIncome int64 `json:"extra_income"`
Breach int64 `json:"breach"`
Date time.Time `json:"date"`
}

View File

@@ -0,0 +1,129 @@
package model
import (
libTime "go-common/library/time"
)
// const text
const (
// TimeLayout time layout
TimeLayout = "2006-01-02 15:04:05"
)
// NewbieLetterReq newbie request
type NewbieLetterReq struct {
Aid int64 `form:"aid" validate:"required"`
Mid int64
}
// Category category
type Category struct {
ID int64 `json:"id"`
Pid int64 `json:"pid"`
Name string `json:"name"`
}
// CategoriesRes category result
type CategoriesRes struct {
Code int `json:"code"`
Data map[int64]*Category `json:"data"`
Message string `json:"message"`
}
// Activity activity
type Activity struct {
ID int64 `json:"-"`
AndroidUrl string `json:"-"`
H5Cover string `json:"-"`
ActUrl string `json:"act_url"`
IosUrl string `json:"-"`
Cover string `json:"cover"`
Type int32 `json:"type"`
}
// ActivitiesRes activities result
type ActivitiesRes struct {
Code int `json:"code"`
Data []*Activity `json:"data"`
Message string `json:"message"`
TTL int64 `json:"ttl"`
}
// VideoUpArchive video up archive
type VideoUpArchive struct {
Aid int64 `json:"aid"`
Mid int64 `json:"mid"`
Tid int64 `json:"tid"`
Title string `json:"title"`
PTime int64 `json:"ptime"`
}
// VideoUpVideo video up video
/*type VideoUpVideo struct {
}*/
// VideoUp video up
type VideoUp struct {
Archive *VideoUpArchive `json:"archive"`
//Videos []*VideoUpVideo `json:"videos"`
}
// VideoUpRes video up result
type VideoUpRes struct {
Code int `json:"code"`
Data *VideoUp `json:"data"`
Message string `json:"message"`
}
// Relation relation
type Relation struct {
Mid int64 `json:"mid"`
Attribute int `json:"attribute"`
Face string `json:"face"`
Name string `json:"name"`
}
// RelationsRes relation result
type RelationsRes struct {
Code int `json:"code"`
Data map[int64]*Relation `json:"data"`
Message string `json:"message"`
TTL int64 `json:"ttl"`
}
// RecommendUp table recommend up
type RecommendUp struct {
ID int64 `json:"id"`
Mid int64 `json:"mid"`
Tid int64 `json:"tid"`
SubTid int64 `json:"sub_tid"`
Reason string `json:"reason"`
Operator string `json:"operator"`
CTime libTime.Time `json:"ctime"`
MTime libTime.Time `json:"mtime"`
}
// NewbieLetterArchive newbie letter archive
type NewbieLetterArchive struct {
Mid int64 `json:"-"`
Tid int64 `json:"-"`
Title string `json:"title"`
PTime string `json:"ptime"`
}
// NewbieLetterUpInfo newbie letter up info
type NewbieLetterUpInfo struct {
Mid int64 `json:"mid"`
Name string `json:"name"`
}
// NewbieLetterRes newbie letter result
type NewbieLetterRes struct {
UperInfo *NewbieLetterUpInfo `json:"uper_info"`
Activities []*Activity `json:"activities"`
Relations []*Relation `json:"relations"`
Archive *NewbieLetterArchive `json:"archive"`
Talent string `json:"talent"`
Area string `json:"area"`
}

View File

@@ -0,0 +1,18 @@
package model
import (
"time"
)
// Notice notice
type Notice struct {
ID int64 `json:"id"`
Title string `json:"title"`
Type int `json:"type"`
Platform int `json:"-"`
Link string `json:"link"`
Status int `json:"-"`
IsDeleted int `json:"-"`
CTime time.Time `json:"ctime"`
MTime time.Time `json:"-"`
}

View File

@@ -0,0 +1,68 @@
package model
import (
"go-common/library/time"
)
// SpecialAward special award info
type SpecialAward struct {
AwardID int64 `json:"award_id"`
AwardName string `json:"award_name"`
Divisions []string `json:"divisions"`
CycleStart time.Time `json:"cycle_start"`
CycleEnd time.Time `json:"cycle_end"`
AnnounceDate time.Time `json:"announce_date"`
Duration int64 `json:"duration"`
OpenStatus int `json:"open_status"`
}
// Resource award resource
type Resource struct {
ResourceType int
ResourceIndex int
Content string
}
// WinningRecord winning record
type WinningRecord struct {
AwardID int64 `json:"award_id"`
AwardName string `json:"award_name"`
PrizeID int64 `json:"prize_id"`
State int `json:"state"`
}
// Poster poster
type Poster struct {
AwardName string `json:"award_name"`
Nickname string `json:"nickname"`
Face string `json:"face"`
PrizeName string `json:"prize_name"`
Date string `json:"date"`
Bonus int64 `json:"bonus"`
}
// SimpleSpecialAward simplify
type SimpleSpecialAward struct {
AwardName string `json:"award_name"`
AwardID int64 `json:"award_id"`
CycleStart time.Time `json:"cycle_start"`
}
// QA question & answer
type QA struct {
Question string `json:"question"`
Answer string `json:"answer"`
}
// UpAwardState up award state
type UpAwardState struct {
AwardID int64 `json:"-"`
AwardName string `json:"award_name"`
State int `json:"state"`
}
// AwardUpStatus up status
type AwardUpStatus struct {
Joined bool `json:"joined"`
Qualified bool `json:"qualified"`
}

View File

@@ -0,0 +1,64 @@
package model
import (
"time"
xtime "go-common/library/time"
)
// UpInfo is users of growup/video/column who applied for.
type UpInfo struct {
ID int64 `json:"id"`
MID int64 `json:"mid"`
Nickname string `json:"nickname"`
AccountType int `json:"account_type"`
OriginalArchiveCount int `json:"original_archive_count"`
MainCategory int `json:"category_id"`
Bgms int `json:"bgms"`
Fans int `json:"fans"`
TotalPlayCount int64 `json:"total_play_count"`
AccountState int `json:"account_state"`
SignType int `json:"sign_type,omitempty"`
Reason string `json:"reason"`
ApplyAt xtime.Time `json:"apply_at"`
SignedAt xtime.Time `json:"signed_at"`
RejectAt xtime.Time `json:"reject_at"`
ForbidAt xtime.Time `json:"forbid_at"`
QuitAt xtime.Time `json:"quit_at"`
DismissAt xtime.Time `json:"dismiss_at"`
ExpiredIn xtime.Time `json:"expired_in"`
IsDeleted int `json:"-"`
}
// UpStatus is user status of growup plan
type UpStatus struct {
Status []*BusinessStatus `json:"status"`
Blocked bool `json:"blocked"`
}
// BusinessStatus type: 1.视频 2.专栏 3.素材
type BusinessStatus struct {
IsWhite bool `json:"in_white_list"`
AccountState int `json:"account_state"`
AccountType int `json:"account_type"`
Type int `json:"type"`
Reason string `json:"reason"`
ShowPanel bool `json:"show_panel"`
ExpiredIn xtime.Time `json:"expired_in"`
QuitAt time.Time `json:"-"`
CTime time.Time `json:"-"`
}
// CreditRecord credit record
type CreditRecord struct {
ID int64 `json:"id"`
MID int64 `json:"mid"`
OperateAt xtime.Time `json:"operate_at"`
Operator string `json:"operator"`
Reason int `json:"reason"`
Deducted int `json:"deducted"`
Remaining int `json:"remaining"`
IsDeleted int `json:"recovered"`
CTime xtime.Time `json:"ctime"`
MTime xtime.Time `json:"mtime"`
}

View File

@@ -0,0 +1,28 @@
package model
import (
"go-common/library/time"
)
// UpBill up_bill
type UpBill struct {
MID int64 `json:"mid"`
Nickname string `json:"nickname"`
Face string `json:"face"`
FirstIncome int64 `json:"first_income"`
MaxIncome int64 `json:"max_income"`
TotalIncome int64 `json:"total_income"`
AvCount int64 `json:"av_count"`
AvMaxIncome int64 `json:"av_max_income"`
AvID int64 `json:"-"`
AvTitle string `json:"av_title"`
QualityValue int64 `json:"quality_value"`
DefeatNum int `json:"defeat_num"`
Title string `json:"title"`
ShareItems string `json:"share_items"`
FirstTime time.Time `json:"first_time"`
MaxTime time.Time `json:"max_time"`
SignedAt time.Time `json:"signed_at"`
EndAt time.Time `json:"end_at"`
Join bool `json:"join"`
}

View File

@@ -0,0 +1,45 @@
package model
import (
"go-common/library/time"
)
// UpAccount up account
type UpAccount struct {
ID int64 `json:"id"`
MID int64 `json:"mid"`
HasSignContract int `json:"has_sign_contract"`
State int `json:"state"`
TotalIncome int64 `json:"total_income"`
TotalUnwithdrawIncome int64 `json:"total_unwithdraw_income"`
TotalWithdrawIncome int64 `json:"total_withdraw_income"`
LastWithdrawTime time.Time `json:"last_withdraw_time"`
Version int64 `json:"version"`
IsDeleted int `json:"is_deleted"`
CTime time.Time `json:"ctime"`
MTime time.Time `json:"mtime"`
AllowanceState int `json:"allowance_state"`
Nickname string `json:"nick_name"`
WithdrawDateVersion string `json:"withdraw_date_version"`
}
// UpIncomeWithdraw up income withdraw
type UpIncomeWithdraw struct {
ID int64 `json:"id"`
MID int64 `json:"mid"`
WithdrawIncome int64 `json:"withdraw_income"`
DateVersion string `json:"date_version"`
State int `json:"state"`
IsDeleted int `json:"is_deleted"`
CTime time.Time `json:"ctime"`
MTime time.Time `json:"mtime"`
}
// WithdrawVo withdraw
type WithdrawVo struct {
MID int64 `json:"mid"`
ThirdOrderNo string `json:"third_order_no"`
ThirdCoin float64 `json:"third_coin"`
CTime string `json:"ctime"`
NotifyURL string `json:"notify_url"`
}