书籍列表接口新增参数
This commit is contained in:
@ -16,8 +16,9 @@ type AdminInfoIn struct {
|
||||
}
|
||||
|
||||
type AdminInfoOut struct {
|
||||
AdminId int64 // 管理员ID
|
||||
Id int64 // 管理员ID
|
||||
Username string // 用户名
|
||||
Role string // 角色类型
|
||||
}
|
||||
|
||||
type AdminEditPassIn struct {
|
||||
|
||||
49
internal/model/ads.go
Normal file
49
internal/model/ads.go
Normal file
@ -0,0 +1,49 @@
|
||||
package model
|
||||
|
||||
import (
|
||||
"server/internal/consts"
|
||||
|
||||
"github.com/gogf/gf/v2/os/gtime"
|
||||
)
|
||||
|
||||
// AdsUploadIn 广告数据上传输入参数
|
||||
type AdsUploadIn struct {
|
||||
UserId int64
|
||||
NodeUid string
|
||||
DeviceCode string
|
||||
Data string
|
||||
}
|
||||
|
||||
// AdsUploadOut 广告数据上传输出参数
|
||||
type AdsUploadOut struct {
|
||||
Success bool `json:"success" dc:"是否成功"`
|
||||
}
|
||||
|
||||
// AdsData 广告数据结构
|
||||
type AdsData struct {
|
||||
AdsPlatId int `json:"ads_plat_id"` // 平台ID:1-META,2-ADMOB
|
||||
AdsCategoryId int `json:"ads_category_id"` // 广告分类:1-横幅广告,2-插页式广告,3-激励插页式广告,4-激励广告,5-原生广告,6-开屏广告
|
||||
AppPackage string `json:"app_package"` // APP包名
|
||||
Status consts.AdState `json:"status"` // 状态:1-拉取失败,2-拉取成功,3-显示失败,4-显示成功,5-未观看完成,6-观看完成,7-未点击,8-已点击,9-未下载,10-已下载
|
||||
}
|
||||
|
||||
// GetAdLifecycleIn 获取广告生命周期输入参数
|
||||
type GetAdLifecycleIn struct {
|
||||
UserId int64
|
||||
AdsPlatId int
|
||||
AdsCategoryId int
|
||||
AppPackage string
|
||||
}
|
||||
|
||||
// GetAdLifecycleOut 获取广告生命周期输出参数
|
||||
type GetAdLifecycleOut struct {
|
||||
Records []*AdLifecycleRecord `json:"records" dc:"广告生命周期记录"`
|
||||
}
|
||||
|
||||
// AdLifecycleRecord 广告生命周期记录
|
||||
type AdLifecycleRecord struct {
|
||||
EventId int64 `json:"event_id" dc:"事件ID"`
|
||||
Status consts.AdState `json:"status" dc:"状态"`
|
||||
StatusDesc string `json:"status_desc" dc:"状态描述"`
|
||||
CreatedAt *gtime.Time `json:"created_at" dc:"创建时间"`
|
||||
}
|
||||
@ -18,7 +18,7 @@ type AuthorListIn struct {
|
||||
}
|
||||
type AuthorListOut struct {
|
||||
Total int
|
||||
List []Author
|
||||
List []AuthorListItem
|
||||
}
|
||||
|
||||
type AuthorAddIn struct {
|
||||
@ -41,6 +41,7 @@ type AuthorCRUDOut struct {
|
||||
}
|
||||
|
||||
type AuthorApplyIn struct {
|
||||
UserId int64
|
||||
PenName string // 笔名
|
||||
Bio string // 作者简介
|
||||
}
|
||||
@ -51,10 +52,50 @@ type AuthorDetailIn struct {
|
||||
AuthorId int64
|
||||
}
|
||||
type AuthorDetailOut struct {
|
||||
g.Meta `orm:"table:authors"`
|
||||
Id int64 `json:"id" orm:"id"`
|
||||
UserId int64 `json:"userId" orm:"user_id"`
|
||||
PenName string `json:"penName" orm:"pen_name"`
|
||||
Bio string `json:"bio" orm:"bio"`
|
||||
User User `json:"user" orm:"with:id = user_id"`
|
||||
g.Meta `orm:"table:authors"`
|
||||
Id int64 `json:"id" orm:"id"` // 作者ID author id
|
||||
UserId int64 `json:"userId" orm:"user_id"` // 用户ID user id
|
||||
PenName string `json:"penName" orm:"pen_name"` // 笔名 pen name
|
||||
Bio string `json:"bio" orm:"bio"` // 作者简介 author bio
|
||||
FollowerCount int `json:"followerCount" orm:"follower_count"` // 粉丝数量 follower count
|
||||
User User `json:"user" orm:"with:id = user_id"` // 用户信息 user info
|
||||
WorksCount int `json:"worksCount" orm:"-"` // 作品数量 works count
|
||||
IsFollowed bool `json:"isFollowed" orm:"-"` // 是否已关注 is followed
|
||||
}
|
||||
|
||||
type AuthorListItem struct {
|
||||
g.Meta `orm:"table:authors"`
|
||||
Id int64 `json:"id"`
|
||||
UserId int64 `json:"userId"`
|
||||
User User `json:"user" orm:"with:id = user_id"`
|
||||
PenName string `json:"penName"`
|
||||
Bio string `json:"bio"`
|
||||
FollowerCount int `json:"followerCount"`
|
||||
Status int `json:"status"`
|
||||
}
|
||||
|
||||
type AuthorInfoIn struct {
|
||||
UserId int64 // 用户ID
|
||||
}
|
||||
|
||||
type AuthorInfoOut struct {
|
||||
Id int64 `json:"id"` // 作者ID
|
||||
PenName string `json:"penName"` // 笔名
|
||||
Role string `json:"role"` // 角色
|
||||
}
|
||||
|
||||
// 审核作者申请入参
|
||||
// AuthorReviewIn 用于管理员审核作者申请
|
||||
// Status: 1=通过,3=拒绝
|
||||
// Remark 可选,记录审核意见
|
||||
type AuthorReviewIn struct {
|
||||
AuthorId int64 // 作者ID
|
||||
Status int // 审核状态 1=通过,2=拒绝
|
||||
Remark string // 审核备注(可选)
|
||||
}
|
||||
|
||||
// 审核作者申请出参
|
||||
// AuthorReviewOut 返回审核是否成功
|
||||
type AuthorReviewOut struct {
|
||||
Success bool
|
||||
}
|
||||
|
||||
@ -25,8 +25,16 @@ type Book struct {
|
||||
Tags string `json:"tags" orm:"tags"`
|
||||
IsRecommended int `json:"isRecommended" orm:"is_recommended"`
|
||||
IsFeatured int `json:"isFeatured" orm:"is_featured"`
|
||||
IsHot int `json:"isHot" orm:"is_hot"`
|
||||
Language string `json:"language" orm:"language"`
|
||||
}
|
||||
type SimpleBook struct {
|
||||
g.Meta `orm:"table:books"`
|
||||
Id int64 `json:"id" orm:"id"`
|
||||
AuthorId int64 `json:"authorId" orm:"author_id"`
|
||||
Author Author `json:"author" orm:"with:id = author_id"`
|
||||
Title string `json:"title" orm:"title"`
|
||||
}
|
||||
|
||||
// App作者信息结构体
|
||||
type AppAuthor struct {
|
||||
@ -112,10 +120,12 @@ type BookAppItem struct {
|
||||
CurrentReaders int64 `json:"currentReaders" dc:"在读人数" orm:"current_readers"`
|
||||
Tags string `json:"tags" dc:"标签" orm:"tags"`
|
||||
IsRecommended int `json:"isRecommended" dc:"是否推荐" orm:"is_recommended"`
|
||||
IsHot int `json:"isHot" dc:"是否热门" orm:"is_hot"`
|
||||
CreatedAt *gtime.Time `json:"createdAt" dc:"创建时间" orm:"created_at"`
|
||||
UpdatedAt *gtime.Time `json:"updatedAt" dc:"更新时间" orm:"updated_at"`
|
||||
HasRated bool `json:"hasRated" dc:"当前用户是否已评分"`
|
||||
MyRating float64 `json:"myRating" dc:"当前用户评分(未评分为0)"`
|
||||
IsInBookshelf bool `json:"isInBookshelf" dc:"当前用户是否已加入书架"`
|
||||
}
|
||||
|
||||
// App 书籍列表查询输入参数
|
||||
@ -129,6 +139,7 @@ type BookAppListIn struct {
|
||||
UserId int64 `json:"userId" dc:"用户ID"`
|
||||
AuthorId int `json:"authorId" dc:"作者ID"`
|
||||
IsFeatured bool `json:"isFeatured" dc:"是否精选"`
|
||||
IsHot bool `json:"isHot" dc:"是否热门"`
|
||||
Language string `json:"language" dc:"语言"`
|
||||
Sort string `json:"sort" dc:"排序字段"`
|
||||
}
|
||||
@ -147,25 +158,34 @@ type BookAppDetailIn struct {
|
||||
|
||||
// App 书籍详情输出结构体
|
||||
type BookAppDetailOut struct {
|
||||
Id int64 `json:"id" dc:"书籍ID"`
|
||||
AuthorId int64 `json:"authorId" dc:"作者ID"`
|
||||
CategoryId int64 `json:"categoryId" dc:"分类ID"`
|
||||
Title string `json:"title" dc:"书名"`
|
||||
CoverUrl string `json:"coverUrl" dc:"封面图"`
|
||||
Description string `json:"description" dc:"简介"`
|
||||
Status int `json:"status" dc:"状态"`
|
||||
Tags string `json:"tags" dc:"标签"`
|
||||
IsRecommended int `json:"isRecommended" dc:"是否推荐"`
|
||||
IsFeatured int `json:"isFeatured" dc:"是否精选"`
|
||||
Language string `json:"language" dc:"语言"`
|
||||
Rating float64 `json:"rating" dc:"评分"`
|
||||
CurrentReaders int64 `json:"currentReaders" dc:"在读人数"`
|
||||
CreatedAt *gtime.Time `json:"createdAt" dc:"创建时间"`
|
||||
UpdatedAt *gtime.Time `json:"updatedAt" dc:"更新时间"`
|
||||
HasRead bool `json:"hasRead" dc:"是否读过"`
|
||||
ReadProgress int `json:"readProgress" dc:"阅读进度百分比"`
|
||||
LastChapterId int64 `json:"lastChapterId" dc:"最近阅读章节ID"`
|
||||
LastReadAt string `json:"lastReadAt" dc:"最近阅读时间"`
|
||||
Id int64 `json:"id" dc:"书籍ID" orm:"id"`
|
||||
CoverUrl string `json:"coverUrl" dc:"封面图" orm:"cover_url"`
|
||||
Rating float64 `json:"rating" dc:"评分" orm:"rating"`
|
||||
Title string `json:"title" dc:"标题" orm:"title"`
|
||||
Description string `json:"description" dc:"简介" orm:"description"`
|
||||
AuthorId int64 `json:"authorId" dc:"作者ID" orm:"author_id"`
|
||||
Author AppAuthor `json:"author" dc:"作者信息" orm:"with:id = author_id"`
|
||||
IsFeatured int `json:"isFeatured" dc:"是否精选" orm:"is_featured"`
|
||||
Language string `json:"language" dc:"语言" orm:"language"`
|
||||
CategoryId int64 `json:"categoryId" dc:"分类ID" orm:"category_id"`
|
||||
Category Category `json:"category" dc:"分类信息" orm:"with:id = category_id"`
|
||||
Status int `json:"status" dc:"状态" orm:"status"`
|
||||
WordsCount int `json:"wordsCount" dc:"字数" orm:"words_count"`
|
||||
ChaptersCount int `json:"chaptersCount" dc:"章节数" orm:"chapters_count"`
|
||||
ReadCount int64 `json:"readCount" dc:"阅读人数" orm:"read_count"`
|
||||
CurrentReaders int64 `json:"currentReaders" dc:"在读人数" orm:"current_readers"`
|
||||
Tags string `json:"tags" dc:"标签" orm:"tags"`
|
||||
IsRecommended int `json:"isRecommended" dc:"是否推荐" orm:"is_recommended"`
|
||||
IsHot int `json:"isHot" dc:"是否热门" orm:"is_hot"`
|
||||
CreatedAt *gtime.Time `json:"createdAt" dc:"创建时间" orm:"created_at"`
|
||||
UpdatedAt *gtime.Time `json:"updatedAt" dc:"更新时间" orm:"updated_at"`
|
||||
HasRated bool `json:"hasRated" dc:"当前用户是否已评分"`
|
||||
MyRating float64 `json:"myRating" dc:"当前用户评分(未评分为0)"`
|
||||
HasRead bool `json:"hasRead" dc:"是否读过"`
|
||||
ReadProgress int `json:"readProgress" dc:"阅读进度百分比"`
|
||||
LastChapterId int64 `json:"lastChapterId" dc:"最近阅读章节ID"`
|
||||
LastReadAt string `json:"lastReadAt" dc:"最近阅读时间"`
|
||||
IsInBookshelf bool `json:"isInBookshelf" dc:"当前用户是否已加入书架"`
|
||||
}
|
||||
|
||||
// App 用户评分输入参数
|
||||
@ -207,16 +227,20 @@ type BookRatingCRUDOut struct {
|
||||
// 我的书籍列表项
|
||||
// =============================
|
||||
type MyBookItem struct {
|
||||
Id int64 `json:"id"`
|
||||
Title string `json:"title"`
|
||||
CoverUrl string `json:"coverUrl"`
|
||||
Description string `json:"description"`
|
||||
Progress int `json:"progress" dc:"阅读进度百分比"`
|
||||
IsInShelf bool `json:"isInShelf" dc:"是否在书架"`
|
||||
LastReadAt string `json:"lastReadAt" dc:"最近阅读时间"`
|
||||
Status int `json:"status" dc:"书籍状态"`
|
||||
AuthorId int64 `json:"authorId"`
|
||||
CategoryId int64 `json:"categoryId"`
|
||||
g.Meta `orm:"table:books"`
|
||||
Id int64 `json:"id"`
|
||||
Title string `json:"title"`
|
||||
CoverUrl string `json:"coverUrl"`
|
||||
Description string `json:"description"`
|
||||
Progress int `json:"progress" dc:"阅读进度百分比"`
|
||||
IsInShelf bool `json:"isInShelf" dc:"是否在书架"`
|
||||
LastReadAt string `json:"lastReadAt" dc:"最近阅读时间"`
|
||||
Status int `json:"status" dc:"书籍状态"`
|
||||
AuthorId int64 `json:"authorId"`
|
||||
CategoryId int64 `json:"categoryId"`
|
||||
Rating float64 `json:"rating" dc:"评分"`
|
||||
HasRated bool `json:"hasRated" dc:"当前用户是否已评分"`
|
||||
MyRating float64 `json:"myRating" dc:"当前用户评分(未评分为0)"`
|
||||
}
|
||||
|
||||
// 我的书籍列表查询参数
|
||||
@ -248,3 +272,8 @@ type BookSetRecommendedIn struct {
|
||||
Id int64 `json:"id" dc:"书籍ID"`
|
||||
IsRecommended int `json:"isRecommended" dc:"是否推荐"`
|
||||
}
|
||||
|
||||
type BookSetHotIn struct {
|
||||
Id int64 `json:"id" dc:"书籍ID"`
|
||||
IsHot int `json:"isHot" dc:"是否热门"`
|
||||
}
|
||||
|
||||
76
internal/model/book_recommendations.go
Normal file
76
internal/model/book_recommendations.go
Normal file
@ -0,0 +1,76 @@
|
||||
package model
|
||||
|
||||
import (
|
||||
"github.com/gogf/gf/v2/frame/g"
|
||||
"github.com/gogf/gf/v2/os/gtime"
|
||||
)
|
||||
|
||||
type BookRecommendation struct {
|
||||
g.Meta `orm:"table:book_recommendations"`
|
||||
Id int64 `json:"id" orm:"id"`
|
||||
BookId int64 `json:"bookId" orm:"book_id"`
|
||||
Book SimpleBook `json:"book" orm:"with:id=book_id"`
|
||||
Type int `json:"type" orm:"type"` // 推荐类型:1=首页Banner,2=编辑推荐,3=分类推荐等
|
||||
CoverUrl string `json:"coverUrl" orm:"cover_url"`
|
||||
SortOrder int `json:"sortOrder" orm:"sort_order"`
|
||||
Status int `json:"status" orm:"status"` // 1=启用,0=禁用
|
||||
CreatedAt *gtime.Time `json:"createdAt" orm:"created_at"`
|
||||
UpdatedAt *gtime.Time `json:"updatedAt" orm:"updated_at"`
|
||||
DeletedAt *gtime.Time `json:"deletedAt" orm:"deleted_at"`
|
||||
}
|
||||
|
||||
type BookRecommendationsListIn struct {
|
||||
Page int `json:"page"`
|
||||
Size int `json:"size"`
|
||||
Type int `json:"type"`
|
||||
Status int `json:"status"`
|
||||
BookId int64 `json:"bookId"`
|
||||
}
|
||||
type BookRecommendationsListOut struct {
|
||||
Total int `json:"total"`
|
||||
List []BookRecommendation `json:"list"`
|
||||
}
|
||||
|
||||
type BookRecommendationsCreateIn struct {
|
||||
BookId int64 `json:"bookId"`
|
||||
Type int `json:"type"`
|
||||
CoverUrl string `json:"coverUrl"`
|
||||
SortOrder int `json:"sortOrder"`
|
||||
Status int `json:"status"`
|
||||
}
|
||||
type BookRecommendationsUpdateIn struct {
|
||||
Id int64 `json:"id"`
|
||||
BookId int64 `json:"bookId"`
|
||||
Type int `json:"type"`
|
||||
CoverUrl string `json:"coverUrl"`
|
||||
SortOrder int `json:"sortOrder"`
|
||||
Status int `json:"status"`
|
||||
}
|
||||
type BookRecommendationsDeleteIn struct {
|
||||
Id int64 `json:"id"`
|
||||
}
|
||||
type BookRecommendationsCRUDOut struct {
|
||||
Success bool `json:"success"`
|
||||
}
|
||||
type BookRecommendationsSetStatusIn struct {
|
||||
Id int64 `json:"id"`
|
||||
Status int `json:"status"`
|
||||
}
|
||||
type BookRecommendationsSortOrderIn struct {
|
||||
Id int64 `json:"id"`
|
||||
SortOrder int `json:"sortOrder"`
|
||||
}
|
||||
|
||||
// App 推荐简要结构体
|
||||
// 只用于 AppList 返回
|
||||
type RecommendAppItem struct {
|
||||
Id int64 `json:"id" dc:"推荐ID"`
|
||||
BookId int64 `json:"bookId" dc:"书籍ID"`
|
||||
CoverUrl string `json:"coverUrl" dc:"推荐封面图"`
|
||||
SortOrder int `json:"sortOrder" dc:"顺序"`
|
||||
}
|
||||
|
||||
type BookRecommendationsAppListOut struct {
|
||||
Total int `json:"total"`
|
||||
List []RecommendAppItem `json:"list"`
|
||||
}
|
||||
@ -77,6 +77,7 @@ type ChapterAppItem struct {
|
||||
UpdatedAt *gtime.Time `json:"updatedAt" orm:"updated_at" dc:"更新时间"`
|
||||
ReadProgress int `json:"readProgress" dc:"阅读进度百分比"`
|
||||
ReadAt *gtime.Time `json:"readAt" dc:"最后阅读时间"`
|
||||
IsPurchased bool `json:"isPurchased" dc:"用户是否已购买该章节"`
|
||||
}
|
||||
|
||||
type ChapterAppListOut struct {
|
||||
@ -121,6 +122,19 @@ type ChapterAppProgressIn struct {
|
||||
UserId int64 `json:"userId" dc:"用户ID"`
|
||||
}
|
||||
|
||||
// App 批量上传阅读进度输入参数
|
||||
type ChapterAppBatchProgressIn struct {
|
||||
BookId int64 `json:"bookId" dc:"书籍ID"`
|
||||
Chapters []ChapterProgressItem `json:"chapters" dc:"章节进度列表"`
|
||||
UserId int64 `json:"userId" dc:"用户ID"`
|
||||
}
|
||||
|
||||
// 章节进度项
|
||||
type ChapterProgressItem struct {
|
||||
ChapterId int64 `json:"chapterId" dc:"章节ID"`
|
||||
Progress int `json:"progress" dc:"阅读进度百分比"`
|
||||
}
|
||||
|
||||
// App 上传阅读进度输出结构体
|
||||
type ChapterAppProgressOut struct {
|
||||
Success bool `json:"success" dc:"是否成功"`
|
||||
|
||||
25
internal/model/do/ad_event_logs.go
Normal file
25
internal/model/do/ad_event_logs.go
Normal file
@ -0,0 +1,25 @@
|
||||
// =================================================================================
|
||||
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
|
||||
// =================================================================================
|
||||
|
||||
package do
|
||||
|
||||
import (
|
||||
"github.com/gogf/gf/v2/frame/g"
|
||||
"github.com/gogf/gf/v2/os/gtime"
|
||||
)
|
||||
|
||||
// AdEventLogs is the golang structure of table ad_event_logs for DAO operations like Where/Data.
|
||||
type AdEventLogs struct {
|
||||
g.Meta `orm:"table:ad_event_logs, do:true"`
|
||||
Id interface{} // 广告事件ID
|
||||
UserId interface{} // 用户ID
|
||||
AdsPlatId interface{} // 平台ID:1-META,2-ADMOB
|
||||
AdsCategoryId interface{} // 广告类型:1-横幅,2-插页,3-激励插页,4-激励,5-原生,6-开屏
|
||||
AppPackage interface{} // App包名
|
||||
Status interface{} // 广告状态:1-拉取失败,2-拉取成功,3-显示失败,4-显示成功,5-未观看完成,6-观看完成,7-未点击,8-已点击,9-未下载,10-已下载
|
||||
StatusDesc interface{} // 状态描述
|
||||
CreatedAt *gtime.Time // 创建时间
|
||||
UpdatedAt *gtime.Time // 更新时间
|
||||
DeletedAt *gtime.Time // 软删除时间戳
|
||||
}
|
||||
21
internal/model/do/ad_event_transitions.go
Normal file
21
internal/model/do/ad_event_transitions.go
Normal file
@ -0,0 +1,21 @@
|
||||
// =================================================================================
|
||||
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
|
||||
// =================================================================================
|
||||
|
||||
package do
|
||||
|
||||
import (
|
||||
"github.com/gogf/gf/v2/frame/g"
|
||||
"github.com/gogf/gf/v2/os/gtime"
|
||||
)
|
||||
|
||||
// AdEventTransitions is the golang structure of table ad_event_transitions for DAO operations like Where/Data.
|
||||
type AdEventTransitions struct {
|
||||
g.Meta `orm:"table:ad_event_transitions, do:true"`
|
||||
Id interface{} // 状态流转记录ID
|
||||
EventId interface{} // 所属广告事件ID,关联ad_event_logs.id
|
||||
FromStatus interface{} // 原状态(首次记录为空)
|
||||
ToStatus interface{} // 目标状态
|
||||
CreatedAt *gtime.Time // 状态变更时间
|
||||
DeletedAt *gtime.Time // 软删除时间戳
|
||||
}
|
||||
@ -11,13 +11,14 @@ import (
|
||||
|
||||
// Authors is the golang structure of table authors for DAO operations like Where/Data.
|
||||
type Authors struct {
|
||||
g.Meta `orm:"table:authors, do:true"`
|
||||
Id interface{} // 作者ID
|
||||
UserId interface{} // 用户ID
|
||||
PenName interface{} // 笔名
|
||||
Bio interface{} // 作者简介
|
||||
Status interface{} // 状态:1=正常,2=禁用
|
||||
CreatedAt *gtime.Time // 创建时间
|
||||
UpdatedAt *gtime.Time // 更新时间
|
||||
DeletedAt *gtime.Time // 软删除时间戳
|
||||
g.Meta `orm:"table:authors, do:true"`
|
||||
Id interface{} // 作者ID
|
||||
UserId interface{} // 用户ID
|
||||
PenName interface{} // 笔名
|
||||
Bio interface{} // 作者简介
|
||||
FollowerCount interface{} // 粉丝数量
|
||||
Status interface{} // 状态:1=正常,2=待审核, 3=未通过
|
||||
CreatedAt *gtime.Time // 创建时间
|
||||
UpdatedAt *gtime.Time // 更新时间
|
||||
DeletedAt *gtime.Time // 软删除时间戳
|
||||
}
|
||||
|
||||
24
internal/model/do/book_recommendations.go
Normal file
24
internal/model/do/book_recommendations.go
Normal file
@ -0,0 +1,24 @@
|
||||
// =================================================================================
|
||||
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
|
||||
// =================================================================================
|
||||
|
||||
package do
|
||||
|
||||
import (
|
||||
"github.com/gogf/gf/v2/frame/g"
|
||||
"github.com/gogf/gf/v2/os/gtime"
|
||||
)
|
||||
|
||||
// BookRecommendations is the golang structure of table book_recommendations for DAO operations like Where/Data.
|
||||
type BookRecommendations struct {
|
||||
g.Meta `orm:"table:book_recommendations, do:true"`
|
||||
Id interface{} // 主键
|
||||
BookId interface{} // 书籍ID,关联 books 表
|
||||
Type interface{} // 推荐类型:1=首页Banner,2=编辑推荐,3=分类推荐等
|
||||
CoverUrl interface{} // 推荐封面图(横图)
|
||||
SortOrder interface{} // 展示排序,越小越靠前
|
||||
Status interface{} // 是否启用:1=启用,0=禁用
|
||||
CreatedAt *gtime.Time // 创建时间
|
||||
UpdatedAt *gtime.Time // 更新时间
|
||||
DeletedAt *gtime.Time // 软删除时间戳
|
||||
}
|
||||
@ -30,5 +30,6 @@ type Books struct {
|
||||
DeletedAt *gtime.Time // 软删除时间戳
|
||||
IsRecommended interface{} // 是否推荐:0=否,1=是
|
||||
IsFeatured interface{} // 是否精选:0=否,1=是
|
||||
IsHot interface{} // 是否热门:0=否,1=是
|
||||
Language interface{} // 语言,如 zh=中文,en=英文,jp=日文
|
||||
}
|
||||
|
||||
24
internal/model/do/sign_in_reward_details.go
Normal file
24
internal/model/do/sign_in_reward_details.go
Normal file
@ -0,0 +1,24 @@
|
||||
// =================================================================================
|
||||
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
|
||||
// =================================================================================
|
||||
|
||||
package do
|
||||
|
||||
import (
|
||||
"github.com/gogf/gf/v2/frame/g"
|
||||
"github.com/gogf/gf/v2/os/gtime"
|
||||
)
|
||||
|
||||
// SignInRewardDetails is the golang structure of table sign_in_reward_details for DAO operations like Where/Data.
|
||||
type SignInRewardDetails struct {
|
||||
g.Meta `orm:"table:sign_in_reward_details, do:true"`
|
||||
Id interface{} // 主键
|
||||
RuleId interface{} // 规则ID,关联 sign_in_reward_rules 表
|
||||
DayNumber interface{} // 签到天数(1到cycle_days)
|
||||
RewardType interface{} // 奖励类型:1=积分
|
||||
Quantity interface{} // 奖励数量,如积分数量或礼包数量
|
||||
Status interface{} // 记录状态:1=启用,0=禁用
|
||||
CreatedAt *gtime.Time // 创建时间
|
||||
UpdatedAt *gtime.Time // 更新时间
|
||||
DeletedAt *gtime.Time // 软删除时间戳
|
||||
}
|
||||
24
internal/model/do/sign_in_reward_rules.go
Normal file
24
internal/model/do/sign_in_reward_rules.go
Normal file
@ -0,0 +1,24 @@
|
||||
// =================================================================================
|
||||
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
|
||||
// =================================================================================
|
||||
|
||||
package do
|
||||
|
||||
import (
|
||||
"github.com/gogf/gf/v2/frame/g"
|
||||
"github.com/gogf/gf/v2/os/gtime"
|
||||
)
|
||||
|
||||
// SignInRewardRules is the golang structure of table sign_in_reward_rules for DAO operations like Where/Data.
|
||||
type SignInRewardRules struct {
|
||||
g.Meta `orm:"table:sign_in_reward_rules, do:true"`
|
||||
Id interface{} // 主键
|
||||
RuleName interface{} // 规则名称,如“7天签到活动”
|
||||
CycleDays interface{} // 奖励周期天数,如7天
|
||||
StartDate *gtime.Time // 活动开始日期
|
||||
EndDate *gtime.Time // 活动结束日期
|
||||
Status interface{} // 规则状态:1=启用,0=禁用
|
||||
CreatedAt *gtime.Time // 创建时间
|
||||
UpdatedAt *gtime.Time // 更新时间
|
||||
DeletedAt *gtime.Time // 软删除时间戳
|
||||
}
|
||||
16
internal/model/do/system.go
Normal file
16
internal/model/do/system.go
Normal file
@ -0,0 +1,16 @@
|
||||
// =================================================================================
|
||||
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
|
||||
// =================================================================================
|
||||
|
||||
package do
|
||||
|
||||
import (
|
||||
"github.com/gogf/gf/v2/frame/g"
|
||||
)
|
||||
|
||||
// System is the golang structure of table system for DAO operations like Where/Data.
|
||||
type System struct {
|
||||
g.Meta `orm:"table:system, do:true"`
|
||||
Key interface{} //
|
||||
Value interface{} //
|
||||
}
|
||||
23
internal/model/do/task_logs.go
Normal file
23
internal/model/do/task_logs.go
Normal file
@ -0,0 +1,23 @@
|
||||
// =================================================================================
|
||||
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
|
||||
// =================================================================================
|
||||
|
||||
package do
|
||||
|
||||
import (
|
||||
"github.com/gogf/gf/v2/frame/g"
|
||||
"github.com/gogf/gf/v2/os/gtime"
|
||||
)
|
||||
|
||||
// TaskLogs is the golang structure of table task_logs for DAO operations like Where/Data.
|
||||
type TaskLogs struct {
|
||||
g.Meta `orm:"table:task_logs, do:true"`
|
||||
Id interface{} // 任务日志ID
|
||||
TaskId interface{} // 任务ID,关联 tasks.id
|
||||
UserId interface{} // 用户ID,关联 users.id
|
||||
RewardPoints interface{} // 本次任务获得的积分
|
||||
ActionTime *gtime.Time // 操作时间(如完成时间)
|
||||
Status interface{} // 日志状态:1=有效,2=无效
|
||||
Extra interface{} // 扩展信息,例如来源、IP 等
|
||||
CreatedAt *gtime.Time // 创建时间
|
||||
}
|
||||
21
internal/model/do/task_types.go
Normal file
21
internal/model/do/task_types.go
Normal file
@ -0,0 +1,21 @@
|
||||
// =================================================================================
|
||||
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
|
||||
// =================================================================================
|
||||
|
||||
package do
|
||||
|
||||
import (
|
||||
"github.com/gogf/gf/v2/frame/g"
|
||||
"github.com/gogf/gf/v2/os/gtime"
|
||||
)
|
||||
|
||||
// TaskTypes is the golang structure of table task_types for DAO operations like Where/Data.
|
||||
type TaskTypes struct {
|
||||
g.Meta `orm:"table:task_types, do:true"`
|
||||
Id interface{} // 任务类型ID
|
||||
Name interface{} // 任务类型名称,例如:广告、写一本书、首次登录
|
||||
Description interface{} // 任务类型描述
|
||||
Status interface{} // 状态:1=启用,2=禁用
|
||||
CreatedAt *gtime.Time // 创建时间
|
||||
UpdatedAt *gtime.Time // 更新时间
|
||||
}
|
||||
24
internal/model/do/tasks.go
Normal file
24
internal/model/do/tasks.go
Normal file
@ -0,0 +1,24 @@
|
||||
// =================================================================================
|
||||
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
|
||||
// =================================================================================
|
||||
|
||||
package do
|
||||
|
||||
import (
|
||||
"github.com/gogf/gf/v2/frame/g"
|
||||
"github.com/gogf/gf/v2/os/gtime"
|
||||
)
|
||||
|
||||
// Tasks is the golang structure of table tasks for DAO operations like Where/Data.
|
||||
type Tasks struct {
|
||||
g.Meta `orm:"table:tasks, do:true"`
|
||||
Id interface{} // 任务ID
|
||||
TaskType interface{} // 任务类型:1=首次登录,2=广告,3=发布书籍
|
||||
Title interface{} // 任务标题
|
||||
Description interface{} // 任务描述
|
||||
RewardPoints interface{} // 完成任务奖励的积分数
|
||||
Status interface{} // 状态:1=启用,2=禁用
|
||||
CreatedAt *gtime.Time // 创建时间
|
||||
UpdatedAt *gtime.Time // 更新时间
|
||||
DeletedAt *gtime.Time // 软删除时间戳
|
||||
}
|
||||
25
internal/model/do/user_sign_in_logs.go
Normal file
25
internal/model/do/user_sign_in_logs.go
Normal file
@ -0,0 +1,25 @@
|
||||
// =================================================================================
|
||||
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
|
||||
// =================================================================================
|
||||
|
||||
package do
|
||||
|
||||
import (
|
||||
"github.com/gogf/gf/v2/frame/g"
|
||||
"github.com/gogf/gf/v2/os/gtime"
|
||||
)
|
||||
|
||||
// UserSignInLogs is the golang structure of table user_sign_in_logs for DAO operations like Where/Data.
|
||||
type UserSignInLogs struct {
|
||||
g.Meta `orm:"table:user_sign_in_logs, do:true"`
|
||||
Id interface{} // 主键
|
||||
UserId interface{} // 用户ID,关联 users 表
|
||||
RuleId interface{} // 规则ID,关联 sign_in_reward_rules 表
|
||||
RewardDetailId interface{} // 奖励详情ID,关联 sign_in_reward_details 表
|
||||
SignInDate *gtime.Time // 签到日期
|
||||
Quantity interface{} // 奖励数量,如积分数量或礼包数量
|
||||
Status interface{} // 记录状态:1=有效,0=无效
|
||||
CreatedAt *gtime.Time // 创建时间
|
||||
UpdatedAt *gtime.Time // 更新时间
|
||||
DeletedAt *gtime.Time // 软删除时间戳
|
||||
}
|
||||
@ -11,14 +11,16 @@ import (
|
||||
|
||||
// Users is the golang structure of table users for DAO operations like Where/Data.
|
||||
type Users struct {
|
||||
g.Meta `orm:"table:users, do:true"`
|
||||
Id interface{} // 用户ID
|
||||
Username interface{} // 用户名
|
||||
PasswordHash interface{} // 密码哈希
|
||||
Avatar interface{} // 头像URL
|
||||
Email interface{} // 邮箱
|
||||
Points interface{} // 积分
|
||||
CreatedAt *gtime.Time // 注册时间
|
||||
UpdatedAt *gtime.Time // 更新时间
|
||||
DeletedAt *gtime.Time // 软删除时间戳
|
||||
g.Meta `orm:"table:users, do:true"`
|
||||
Id interface{} // 用户ID
|
||||
Username interface{} // 用户名
|
||||
PasswordHash interface{} // 密码哈希
|
||||
Avatar interface{} // 头像URL
|
||||
Email interface{} // 邮箱
|
||||
Points interface{} // 积分
|
||||
CreatedAt *gtime.Time // 注册时间
|
||||
UpdatedAt *gtime.Time // 更新时间
|
||||
DeletedAt *gtime.Time // 软删除时间戳
|
||||
BackgroundUrl interface{} // 作者背景图
|
||||
AttentionCount interface{} // 关注他人的数量 attention count
|
||||
}
|
||||
|
||||
23
internal/model/entity/ad_event_logs.go
Normal file
23
internal/model/entity/ad_event_logs.go
Normal file
@ -0,0 +1,23 @@
|
||||
// =================================================================================
|
||||
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
|
||||
// =================================================================================
|
||||
|
||||
package entity
|
||||
|
||||
import (
|
||||
"github.com/gogf/gf/v2/os/gtime"
|
||||
)
|
||||
|
||||
// AdEventLogs is the golang structure for table ad_event_logs.
|
||||
type AdEventLogs struct {
|
||||
Id int64 `json:"id" orm:"id" description:"广告事件ID"` // 广告事件ID
|
||||
UserId int64 `json:"userId" orm:"user_id" description:"用户ID"` // 用户ID
|
||||
AdsPlatId int `json:"adsPlatId" orm:"ads_plat_id" description:"平台ID:1-META,2-ADMOB"` // 平台ID:1-META,2-ADMOB
|
||||
AdsCategoryId int `json:"adsCategoryId" orm:"ads_category_id" description:"广告类型:1-横幅,2-插页,3-激励插页,4-激励,5-原生,6-开屏"` // 广告类型:1-横幅,2-插页,3-激励插页,4-激励,5-原生,6-开屏
|
||||
AppPackage string `json:"appPackage" orm:"app_package" description:"App包名"` // App包名
|
||||
Status int `json:"status" orm:"status" description:"广告状态:1-拉取失败,2-拉取成功,3-显示失败,4-显示成功,5-未观看完成,6-观看完成,7-未点击,8-已点击,9-未下载,10-已下载"` // 广告状态:1-拉取失败,2-拉取成功,3-显示失败,4-显示成功,5-未观看完成,6-观看完成,7-未点击,8-已点击,9-未下载,10-已下载
|
||||
StatusDesc string `json:"statusDesc" orm:"status_desc" description:"状态描述"` // 状态描述
|
||||
CreatedAt *gtime.Time `json:"createdAt" orm:"created_at" description:"创建时间"` // 创建时间
|
||||
UpdatedAt *gtime.Time `json:"updatedAt" orm:"updated_at" description:"更新时间"` // 更新时间
|
||||
DeletedAt *gtime.Time `json:"deletedAt" orm:"deleted_at" description:"软删除时间戳"` // 软删除时间戳
|
||||
}
|
||||
19
internal/model/entity/ad_event_transitions.go
Normal file
19
internal/model/entity/ad_event_transitions.go
Normal file
@ -0,0 +1,19 @@
|
||||
// =================================================================================
|
||||
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
|
||||
// =================================================================================
|
||||
|
||||
package entity
|
||||
|
||||
import (
|
||||
"github.com/gogf/gf/v2/os/gtime"
|
||||
)
|
||||
|
||||
// AdEventTransitions is the golang structure for table ad_event_transitions.
|
||||
type AdEventTransitions struct {
|
||||
Id int64 `json:"id" orm:"id" description:"状态流转记录ID"` // 状态流转记录ID
|
||||
EventId int64 `json:"eventId" orm:"event_id" description:"所属广告事件ID,关联ad_event_logs.id"` // 所属广告事件ID,关联ad_event_logs.id
|
||||
FromStatus int `json:"fromStatus" orm:"from_status" description:"原状态(首次记录为空)"` // 原状态(首次记录为空)
|
||||
ToStatus int `json:"toStatus" orm:"to_status" description:"目标状态"` // 目标状态
|
||||
CreatedAt *gtime.Time `json:"createdAt" orm:"created_at" description:"状态变更时间"` // 状态变更时间
|
||||
DeletedAt *gtime.Time `json:"deletedAt" orm:"deleted_at" description:"软删除时间戳"` // 软删除时间戳
|
||||
}
|
||||
@ -10,12 +10,13 @@ import (
|
||||
|
||||
// Authors is the golang structure for table authors.
|
||||
type Authors struct {
|
||||
Id int64 `json:"id" orm:"id" description:"作者ID"` // 作者ID
|
||||
UserId int64 `json:"userId" orm:"user_id" description:"用户ID"` // 用户ID
|
||||
PenName string `json:"penName" orm:"pen_name" description:"笔名"` // 笔名
|
||||
Bio string `json:"bio" orm:"bio" description:"作者简介"` // 作者简介
|
||||
Status int `json:"status" orm:"status" description:"状态:1=正常,2=禁用"` // 状态:1=正常,2=禁用
|
||||
CreatedAt *gtime.Time `json:"createdAt" orm:"created_at" description:"创建时间"` // 创建时间
|
||||
UpdatedAt *gtime.Time `json:"updatedAt" orm:"updated_at" description:"更新时间"` // 更新时间
|
||||
DeletedAt *gtime.Time `json:"deletedAt" orm:"deleted_at" description:"软删除时间戳"` // 软删除时间戳
|
||||
Id int64 `json:"id" orm:"id" description:"作者ID"` // 作者ID
|
||||
UserId int64 `json:"userId" orm:"user_id" description:"用户ID"` // 用户ID
|
||||
PenName string `json:"penName" orm:"pen_name" description:"笔名"` // 笔名
|
||||
Bio string `json:"bio" orm:"bio" description:"作者简介"` // 作者简介
|
||||
FollowerCount uint `json:"followerCount" orm:"follower_count" description:"粉丝数量"` // 粉丝数量
|
||||
Status int `json:"status" orm:"status" description:"状态:1=正常,2=待审核, 3=未通过"` // 状态:1=正常,2=待审核, 3=未通过
|
||||
CreatedAt *gtime.Time `json:"createdAt" orm:"created_at" description:"创建时间"` // 创建时间
|
||||
UpdatedAt *gtime.Time `json:"updatedAt" orm:"updated_at" description:"更新时间"` // 更新时间
|
||||
DeletedAt *gtime.Time `json:"deletedAt" orm:"deleted_at" description:"软删除时间戳"` // 软删除时间戳
|
||||
}
|
||||
|
||||
22
internal/model/entity/book_recommendations.go
Normal file
22
internal/model/entity/book_recommendations.go
Normal file
@ -0,0 +1,22 @@
|
||||
// =================================================================================
|
||||
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
|
||||
// =================================================================================
|
||||
|
||||
package entity
|
||||
|
||||
import (
|
||||
"github.com/gogf/gf/v2/os/gtime"
|
||||
)
|
||||
|
||||
// BookRecommendations is the golang structure for table book_recommendations.
|
||||
type BookRecommendations struct {
|
||||
Id int64 `json:"id" orm:"id" description:"主键"` // 主键
|
||||
BookId int64 `json:"bookId" orm:"book_id" description:"书籍ID,关联 books 表"` // 书籍ID,关联 books 表
|
||||
Type int `json:"type" orm:"type" description:"推荐类型:1=首页Banner,2=编辑推荐,3=分类推荐等"` // 推荐类型:1=首页Banner,2=编辑推荐,3=分类推荐等
|
||||
CoverUrl string `json:"coverUrl" orm:"cover_url" description:"推荐封面图(横图)"` // 推荐封面图(横图)
|
||||
SortOrder int `json:"sortOrder" orm:"sort_order" description:"展示排序,越小越靠前"` // 展示排序,越小越靠前
|
||||
Status int `json:"status" orm:"status" description:"是否启用:1=启用,0=禁用"` // 是否启用:1=启用,0=禁用
|
||||
CreatedAt *gtime.Time `json:"createdAt" orm:"created_at" description:"创建时间"` // 创建时间
|
||||
UpdatedAt *gtime.Time `json:"updatedAt" orm:"updated_at" description:"更新时间"` // 更新时间
|
||||
DeletedAt *gtime.Time `json:"deletedAt" orm:"deleted_at" description:"软删除时间戳"` // 软删除时间戳
|
||||
}
|
||||
@ -28,5 +28,6 @@ type Books struct {
|
||||
DeletedAt *gtime.Time `json:"deletedAt" orm:"deleted_at" description:"软删除时间戳"` // 软删除时间戳
|
||||
IsRecommended int `json:"isRecommended" orm:"is_recommended" description:"是否推荐:0=否,1=是"` // 是否推荐:0=否,1=是
|
||||
IsFeatured int `json:"isFeatured" orm:"is_featured" description:"是否精选:0=否,1=是"` // 是否精选:0=否,1=是
|
||||
IsHot int `json:"isHot" orm:"is_hot" description:"是否热门:0=否,1=是"` // 是否热门:0=否,1=是
|
||||
Language string `json:"language" orm:"language" description:"语言,如 zh=中文,en=英文,jp=日文"` // 语言,如 zh=中文,en=英文,jp=日文
|
||||
}
|
||||
|
||||
22
internal/model/entity/sign_in_reward_details.go
Normal file
22
internal/model/entity/sign_in_reward_details.go
Normal file
@ -0,0 +1,22 @@
|
||||
// =================================================================================
|
||||
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
|
||||
// =================================================================================
|
||||
|
||||
package entity
|
||||
|
||||
import (
|
||||
"github.com/gogf/gf/v2/os/gtime"
|
||||
)
|
||||
|
||||
// SignInRewardDetails is the golang structure for table sign_in_reward_details.
|
||||
type SignInRewardDetails struct {
|
||||
Id int64 `json:"id" orm:"id" description:"主键"` // 主键
|
||||
RuleId int64 `json:"ruleId" orm:"rule_id" description:"规则ID,关联 sign_in_reward_rules 表"` // 规则ID,关联 sign_in_reward_rules 表
|
||||
DayNumber int `json:"dayNumber" orm:"day_number" description:"签到天数(1到cycle_days)"` // 签到天数(1到cycle_days)
|
||||
RewardType int `json:"rewardType" orm:"reward_type" description:"奖励类型:1=积分"` // 奖励类型:1=积分
|
||||
Quantity int `json:"quantity" orm:"quantity" description:"奖励数量,如积分数量或礼包数量"` // 奖励数量,如积分数量或礼包数量
|
||||
Status int `json:"status" orm:"status" description:"记录状态:1=启用,0=禁用"` // 记录状态:1=启用,0=禁用
|
||||
CreatedAt *gtime.Time `json:"createdAt" orm:"created_at" description:"创建时间"` // 创建时间
|
||||
UpdatedAt *gtime.Time `json:"updatedAt" orm:"updated_at" description:"更新时间"` // 更新时间
|
||||
DeletedAt *gtime.Time `json:"deletedAt" orm:"deleted_at" description:"软删除时间戳"` // 软删除时间戳
|
||||
}
|
||||
22
internal/model/entity/sign_in_reward_rules.go
Normal file
22
internal/model/entity/sign_in_reward_rules.go
Normal file
@ -0,0 +1,22 @@
|
||||
// =================================================================================
|
||||
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
|
||||
// =================================================================================
|
||||
|
||||
package entity
|
||||
|
||||
import (
|
||||
"github.com/gogf/gf/v2/os/gtime"
|
||||
)
|
||||
|
||||
// SignInRewardRules is the golang structure for table sign_in_reward_rules.
|
||||
type SignInRewardRules struct {
|
||||
Id int64 `json:"id" orm:"id" description:"主键"` // 主键
|
||||
RuleName string `json:"ruleName" orm:"rule_name" description:"规则名称,如“7天签到活动”"` // 规则名称,如“7天签到活动”
|
||||
CycleDays int `json:"cycleDays" orm:"cycle_days" description:"奖励周期天数,如7天"` // 奖励周期天数,如7天
|
||||
StartDate *gtime.Time `json:"startDate" orm:"start_date" description:"活动开始日期"` // 活动开始日期
|
||||
EndDate *gtime.Time `json:"endDate" orm:"end_date" description:"活动结束日期"` // 活动结束日期
|
||||
Status int `json:"status" orm:"status" description:"规则状态:1=启用,0=禁用"` // 规则状态:1=启用,0=禁用
|
||||
CreatedAt *gtime.Time `json:"createdAt" orm:"created_at" description:"创建时间"` // 创建时间
|
||||
UpdatedAt *gtime.Time `json:"updatedAt" orm:"updated_at" description:"更新时间"` // 更新时间
|
||||
DeletedAt *gtime.Time `json:"deletedAt" orm:"deleted_at" description:"软删除时间戳"` // 软删除时间戳
|
||||
}
|
||||
11
internal/model/entity/system.go
Normal file
11
internal/model/entity/system.go
Normal file
@ -0,0 +1,11 @@
|
||||
// =================================================================================
|
||||
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
|
||||
// =================================================================================
|
||||
|
||||
package entity
|
||||
|
||||
// System is the golang structure for table system.
|
||||
type System struct {
|
||||
Key string `json:"key" orm:"key" description:""` //
|
||||
Value string `json:"value" orm:"value" description:""` //
|
||||
}
|
||||
21
internal/model/entity/task_logs.go
Normal file
21
internal/model/entity/task_logs.go
Normal file
@ -0,0 +1,21 @@
|
||||
// =================================================================================
|
||||
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
|
||||
// =================================================================================
|
||||
|
||||
package entity
|
||||
|
||||
import (
|
||||
"github.com/gogf/gf/v2/os/gtime"
|
||||
)
|
||||
|
||||
// TaskLogs is the golang structure for table task_logs.
|
||||
type TaskLogs struct {
|
||||
Id int64 `json:"id" orm:"id" description:"任务日志ID"` // 任务日志ID
|
||||
TaskId int64 `json:"taskId" orm:"task_id" description:"任务ID,关联 tasks.id"` // 任务ID,关联 tasks.id
|
||||
UserId int64 `json:"userId" orm:"user_id" description:"用户ID,关联 users.id"` // 用户ID,关联 users.id
|
||||
RewardPoints int `json:"rewardPoints" orm:"reward_points" description:"本次任务获得的积分"` // 本次任务获得的积分
|
||||
ActionTime *gtime.Time `json:"actionTime" orm:"action_time" description:"操作时间(如完成时间)"` // 操作时间(如完成时间)
|
||||
Status int `json:"status" orm:"status" description:"日志状态:1=有效,2=无效"` // 日志状态:1=有效,2=无效
|
||||
Extra string `json:"extra" orm:"extra" description:"扩展信息,例如来源、IP 等"` // 扩展信息,例如来源、IP 等
|
||||
CreatedAt *gtime.Time `json:"createdAt" orm:"created_at" description:"创建时间"` // 创建时间
|
||||
}
|
||||
19
internal/model/entity/task_types.go
Normal file
19
internal/model/entity/task_types.go
Normal file
@ -0,0 +1,19 @@
|
||||
// =================================================================================
|
||||
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
|
||||
// =================================================================================
|
||||
|
||||
package entity
|
||||
|
||||
import (
|
||||
"github.com/gogf/gf/v2/os/gtime"
|
||||
)
|
||||
|
||||
// TaskTypes is the golang structure for table task_types.
|
||||
type TaskTypes struct {
|
||||
Id uint `json:"id" orm:"id" description:"任务类型ID"` // 任务类型ID
|
||||
Name string `json:"name" orm:"name" description:"任务类型名称,例如:广告、写一本书、首次登录"` // 任务类型名称,例如:广告、写一本书、首次登录
|
||||
Description string `json:"description" orm:"description" description:"任务类型描述"` // 任务类型描述
|
||||
Status int `json:"status" orm:"status" description:"状态:1=启用,2=禁用"` // 状态:1=启用,2=禁用
|
||||
CreatedAt *gtime.Time `json:"createdAt" orm:"created_at" description:"创建时间"` // 创建时间
|
||||
UpdatedAt *gtime.Time `json:"updatedAt" orm:"updated_at" description:"更新时间"` // 更新时间
|
||||
}
|
||||
22
internal/model/entity/tasks.go
Normal file
22
internal/model/entity/tasks.go
Normal file
@ -0,0 +1,22 @@
|
||||
// =================================================================================
|
||||
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
|
||||
// =================================================================================
|
||||
|
||||
package entity
|
||||
|
||||
import (
|
||||
"github.com/gogf/gf/v2/os/gtime"
|
||||
)
|
||||
|
||||
// Tasks is the golang structure for table tasks.
|
||||
type Tasks struct {
|
||||
Id int64 `json:"id" orm:"id" description:"任务ID"` // 任务ID
|
||||
TaskType int `json:"taskType" orm:"task_type" description:"任务类型:1=首次登录,2=广告,3=发布书籍"` // 任务类型:1=首次登录,2=广告,3=发布书籍
|
||||
Title string `json:"title" orm:"title" description:"任务标题"` // 任务标题
|
||||
Description string `json:"description" orm:"description" description:"任务描述"` // 任务描述
|
||||
RewardPoints uint `json:"rewardPoints" orm:"reward_points" description:"完成任务奖励的积分数"` // 完成任务奖励的积分数
|
||||
Status int `json:"status" orm:"status" description:"状态:1=启用,2=禁用"` // 状态:1=启用,2=禁用
|
||||
CreatedAt *gtime.Time `json:"createdAt" orm:"created_at" description:"创建时间"` // 创建时间
|
||||
UpdatedAt *gtime.Time `json:"updatedAt" orm:"updated_at" description:"更新时间"` // 更新时间
|
||||
DeletedAt *gtime.Time `json:"deletedAt" orm:"deleted_at" description:"软删除时间戳"` // 软删除时间戳
|
||||
}
|
||||
23
internal/model/entity/user_sign_in_logs.go
Normal file
23
internal/model/entity/user_sign_in_logs.go
Normal file
@ -0,0 +1,23 @@
|
||||
// =================================================================================
|
||||
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
|
||||
// =================================================================================
|
||||
|
||||
package entity
|
||||
|
||||
import (
|
||||
"github.com/gogf/gf/v2/os/gtime"
|
||||
)
|
||||
|
||||
// UserSignInLogs is the golang structure for table user_sign_in_logs.
|
||||
type UserSignInLogs struct {
|
||||
Id int64 `json:"id" orm:"id" description:"主键"` // 主键
|
||||
UserId int64 `json:"userId" orm:"user_id" description:"用户ID,关联 users 表"` // 用户ID,关联 users 表
|
||||
RuleId int64 `json:"ruleId" orm:"rule_id" description:"规则ID,关联 sign_in_reward_rules 表"` // 规则ID,关联 sign_in_reward_rules 表
|
||||
RewardDetailId int64 `json:"rewardDetailId" orm:"reward_detail_id" description:"奖励详情ID,关联 sign_in_reward_details 表"` // 奖励详情ID,关联 sign_in_reward_details 表
|
||||
SignInDate *gtime.Time `json:"signInDate" orm:"sign_in_date" description:"签到日期"` // 签到日期
|
||||
Quantity int `json:"quantity" orm:"quantity" description:"奖励数量,如积分数量或礼包数量"` // 奖励数量,如积分数量或礼包数量
|
||||
Status int `json:"status" orm:"status" description:"记录状态:1=有效,0=无效"` // 记录状态:1=有效,0=无效
|
||||
CreatedAt *gtime.Time `json:"createdAt" orm:"created_at" description:"创建时间"` // 创建时间
|
||||
UpdatedAt *gtime.Time `json:"updatedAt" orm:"updated_at" description:"更新时间"` // 更新时间
|
||||
DeletedAt *gtime.Time `json:"deletedAt" orm:"deleted_at" description:"软删除时间戳"` // 软删除时间戳
|
||||
}
|
||||
@ -10,13 +10,15 @@ import (
|
||||
|
||||
// Users is the golang structure for table users.
|
||||
type Users struct {
|
||||
Id int64 `json:"id" orm:"id" description:"用户ID"` // 用户ID
|
||||
Username string `json:"username" orm:"username" description:"用户名"` // 用户名
|
||||
PasswordHash string `json:"passwordHash" orm:"password_hash" description:"密码哈希"` // 密码哈希
|
||||
Avatar string `json:"avatar" orm:"avatar" description:"头像URL"` // 头像URL
|
||||
Email string `json:"email" orm:"email" description:"邮箱"` // 邮箱
|
||||
Points uint64 `json:"points" orm:"points" description:"积分"` // 积分
|
||||
CreatedAt *gtime.Time `json:"createdAt" orm:"created_at" description:"注册时间"` // 注册时间
|
||||
UpdatedAt *gtime.Time `json:"updatedAt" orm:"updated_at" description:"更新时间"` // 更新时间
|
||||
DeletedAt *gtime.Time `json:"deletedAt" orm:"deleted_at" description:"软删除时间戳"` // 软删除时间戳
|
||||
Id int64 `json:"id" orm:"id" description:"用户ID"` // 用户ID
|
||||
Username string `json:"username" orm:"username" description:"用户名"` // 用户名
|
||||
PasswordHash string `json:"passwordHash" orm:"password_hash" description:"密码哈希"` // 密码哈希
|
||||
Avatar string `json:"avatar" orm:"avatar" description:"头像URL"` // 头像URL
|
||||
Email string `json:"email" orm:"email" description:"邮箱"` // 邮箱
|
||||
Points uint64 `json:"points" orm:"points" description:"积分"` // 积分
|
||||
CreatedAt *gtime.Time `json:"createdAt" orm:"created_at" description:"注册时间"` // 注册时间
|
||||
UpdatedAt *gtime.Time `json:"updatedAt" orm:"updated_at" description:"更新时间"` // 更新时间
|
||||
DeletedAt *gtime.Time `json:"deletedAt" orm:"deleted_at" description:"软删除时间戳"` // 软删除时间戳
|
||||
BackgroundUrl string `json:"backgroundUrl" orm:"background_url" description:"作者背景图"` // 作者背景图
|
||||
AttentionCount int `json:"attentionCount" orm:"attention_count" description:"关注他人的数量 attention count"` // 关注他人的数量 attention count
|
||||
}
|
||||
|
||||
78
internal/model/sign_in_reward_details.go
Normal file
78
internal/model/sign_in_reward_details.go
Normal file
@ -0,0 +1,78 @@
|
||||
package model
|
||||
|
||||
import (
|
||||
"github.com/gogf/gf/v2/frame/g"
|
||||
"github.com/gogf/gf/v2/os/gtime"
|
||||
)
|
||||
|
||||
type SignInRewardDetail struct {
|
||||
g.Meta `orm:"table:sign_in_reward_details"`
|
||||
Id int64 `json:"id" orm:"id"`
|
||||
RuleId int64 `json:"ruleId" orm:"rule_id"`
|
||||
DayNumber int `json:"dayNumber" orm:"day_number"`
|
||||
RewardType int `json:"rewardType" orm:"reward_type"`
|
||||
Quantity int `json:"quantity" orm:"quantity"`
|
||||
Status int `json:"status" orm:"status"`
|
||||
CreatedAt *gtime.Time `json:"createdAt" orm:"created_at"`
|
||||
UpdatedAt *gtime.Time `json:"updatedAt" orm:"updated_at"`
|
||||
DeletedAt *gtime.Time `json:"deletedAt" orm:"deleted_at"`
|
||||
}
|
||||
|
||||
type SimpleReward struct {
|
||||
g.Meta `orm:"table:sign_in_reward_details"`
|
||||
Id int64 `json:"id" orm:"id"`
|
||||
RuleId int64 `json:"ruleId" orm:"rule_id"`
|
||||
DayNumber int `json:"dayNumber" orm:"day_number"`
|
||||
RewardType int `json:"rewardType" orm:"reward_type"`
|
||||
Quantity int `json:"quantity" orm:"quantity"`
|
||||
}
|
||||
|
||||
// 查询单个明细入参
|
||||
type SignInRewardDetailGetIn struct {
|
||||
Id int64 `json:"id" dc:"明细ID"`
|
||||
}
|
||||
|
||||
// 查询单个明细出参
|
||||
type SignInRewardDetailGetOut struct {
|
||||
SignInRewardDetail
|
||||
}
|
||||
|
||||
// 查询明细列表入参
|
||||
type SignInRewardDetailListIn struct {
|
||||
RuleId int64 `json:"ruleId" dc:"规则ID"`
|
||||
}
|
||||
|
||||
// 查询明细列表出参
|
||||
type SignInRewardDetailListOut struct {
|
||||
List []SignInRewardDetail `json:"list"`
|
||||
}
|
||||
|
||||
// 删除明细入参
|
||||
type SignInRewardDetailDeleteIn struct {
|
||||
Id int64 `json:"id" dc:"明细ID"`
|
||||
}
|
||||
|
||||
// 删除明细出参
|
||||
type SignInRewardDetailDeleteOut struct {
|
||||
Success bool `json:"success"`
|
||||
}
|
||||
|
||||
// 设置明细状态入参
|
||||
type SignInRewardDetailSetStatusIn struct {
|
||||
Id int64 `json:"id" dc:"明细ID"`
|
||||
Status int `json:"status" dc:"状态"`
|
||||
}
|
||||
|
||||
// 设置明细状态出参
|
||||
type SignInRewardDetailSetStatusOut struct {
|
||||
Success bool `json:"success"`
|
||||
}
|
||||
|
||||
type SignInListItem struct {
|
||||
g.Meta `orm:"table:sign_in_reward_details"`
|
||||
Id int64 `json:"id" orm:"id"`
|
||||
RuleId int64 `json:"ruleId" orm:"rule_id"`
|
||||
DayNumber int `json:"dayNumber" orm:"day_number"`
|
||||
Quantity int `json:"quantity" orm:"quantity"`
|
||||
IsClaimed bool `json:"isClaimed" orm:"-"`
|
||||
}
|
||||
66
internal/model/sign_in_reward_rules.go
Normal file
66
internal/model/sign_in_reward_rules.go
Normal file
@ -0,0 +1,66 @@
|
||||
package model
|
||||
|
||||
import (
|
||||
"github.com/gogf/gf/v2/frame/g"
|
||||
"github.com/gogf/gf/v2/os/gtime"
|
||||
)
|
||||
|
||||
type SignInRewardRule struct {
|
||||
g.Meta `orm:"table:sign_in_reward_rules"`
|
||||
Id int64 `json:"id" orm:"id"`
|
||||
RuleName string `json:"ruleName" orm:"rule_name"`
|
||||
CycleDays int `json:"cycleDays" orm:"cycle_days"`
|
||||
StartDate string `json:"startDate" orm:"start_date"`
|
||||
EndDate string `json:"endDate" orm:"end_date"`
|
||||
Status int `json:"status" orm:"status"`
|
||||
CreatedAt *gtime.Time `json:"createdAt" orm:"created_at"`
|
||||
UpdatedAt *gtime.Time `json:"updatedAt" orm:"updated_at"`
|
||||
DeletedAt *gtime.Time `json:"deletedAt" orm:"deleted_at"`
|
||||
}
|
||||
|
||||
type SignInRewardRulesListIn struct {
|
||||
Page int `json:"page"`
|
||||
Size int `json:"size"`
|
||||
Status int `json:"status"`
|
||||
RuleName string `json:"ruleName"`
|
||||
}
|
||||
type SignInRewardRulesListOut struct {
|
||||
Total int `json:"total"`
|
||||
List []SignInRewardRule `json:"list"`
|
||||
}
|
||||
|
||||
type SignInRewardRulesCreateIn struct {
|
||||
RuleName string `json:"ruleName"`
|
||||
CycleDays int `json:"cycleDays"`
|
||||
StartDate string `json:"startDate"`
|
||||
EndDate string `json:"endDate"`
|
||||
Status int `json:"status"`
|
||||
}
|
||||
type SignInRewardRulesUpdateIn struct {
|
||||
Id int64 `json:"id"`
|
||||
RuleName string `json:"ruleName"`
|
||||
CycleDays int `json:"cycleDays"`
|
||||
StartDate string `json:"startDate"`
|
||||
EndDate string `json:"endDate"`
|
||||
Status int `json:"status"`
|
||||
}
|
||||
type SignInRewardRulesDeleteIn struct {
|
||||
Id int64 `json:"id"`
|
||||
}
|
||||
type SignInRewardRulesCRUDOut struct {
|
||||
Success bool `json:"success"`
|
||||
}
|
||||
type SignInRewardRulesSetStatusIn struct {
|
||||
Id int64 `json:"id"`
|
||||
Status int `json:"status"`
|
||||
}
|
||||
|
||||
type SignInListIn struct {
|
||||
UserId int64 `json:"userId"`
|
||||
}
|
||||
|
||||
type SignInListOut struct {
|
||||
g.Meta `orm:"table:sign_in_reward_rules"`
|
||||
Id int64 `json:"id" orm:"id"`
|
||||
List []SignInListItem `json:"list" orm:"with:rule_id = id"`
|
||||
}
|
||||
25
internal/model/system.go
Normal file
25
internal/model/system.go
Normal file
@ -0,0 +1,25 @@
|
||||
package model
|
||||
|
||||
import "server/internal/model/entity"
|
||||
|
||||
type SystemOutput struct {
|
||||
entity.System
|
||||
}
|
||||
|
||||
type SystemUniqueInput struct {
|
||||
Key string
|
||||
Lock
|
||||
}
|
||||
type Lock bool
|
||||
type SystemAdsOutput struct {
|
||||
Index string `json:"index"`
|
||||
}
|
||||
|
||||
type SystemVersionOutput struct {
|
||||
Ios map[string]string `json:"ios"`
|
||||
Android map[string]string `json:"android"`
|
||||
}
|
||||
type SystemSaveInput struct {
|
||||
Key string
|
||||
Value string
|
||||
}
|
||||
101
internal/model/task.go
Normal file
101
internal/model/task.go
Normal file
@ -0,0 +1,101 @@
|
||||
package model
|
||||
|
||||
import (
|
||||
"github.com/gogf/gf/v2/os/gtime"
|
||||
)
|
||||
|
||||
type Task struct {
|
||||
Id int64 `json:"id" orm:"id"`
|
||||
TaskType uint `json:"taskType" orm:"task_type"`
|
||||
Title string `json:"title" orm:"title"`
|
||||
Description string `json:"description" orm:"description"`
|
||||
RewardPoints uint `json:"rewardPoints" orm:"reward_points"`
|
||||
Limit uint `json:"limit" orm:"limit"`
|
||||
LimitType int `json:"limitType" orm:"limit_type"`
|
||||
Status int `json:"status" orm:"status"`
|
||||
StartTime *gtime.Time `json:"startTime" orm:"start_time"`
|
||||
EndTime *gtime.Time `json:"endTime" orm:"end_time"`
|
||||
CreatedAt *gtime.Time `json:"createdAt" orm:"created_at"`
|
||||
UpdatedAt *gtime.Time `json:"updatedAt" orm:"updated_at"`
|
||||
DeletedAt *gtime.Time `json:"deletedAt" orm:"deleted_at"`
|
||||
}
|
||||
|
||||
type TaskListIn struct {
|
||||
Page int
|
||||
Size int
|
||||
Title string // 可选,按标题模糊搜索
|
||||
Status int // 可选,按状态筛选
|
||||
}
|
||||
type TaskListOut struct {
|
||||
Total int
|
||||
List []Task
|
||||
}
|
||||
|
||||
type TaskAddIn struct {
|
||||
TaskType uint
|
||||
Title string
|
||||
Description string
|
||||
RewardPoints uint
|
||||
Limit uint
|
||||
LimitType int
|
||||
Status int
|
||||
StartTime *gtime.Time
|
||||
EndTime *gtime.Time
|
||||
}
|
||||
type TaskEditIn struct {
|
||||
Id int64
|
||||
TaskType uint
|
||||
Title string
|
||||
Description string
|
||||
RewardPoints uint
|
||||
Limit uint
|
||||
LimitType int
|
||||
Status int
|
||||
StartTime *gtime.Time
|
||||
EndTime *gtime.Time
|
||||
}
|
||||
type TaskDelIn struct {
|
||||
Id int64
|
||||
}
|
||||
type TaskCRUDOut struct {
|
||||
Success bool
|
||||
}
|
||||
|
||||
// App端任务列表项,包含用户完成情况
|
||||
// CompletedCount: 用户已完成次数
|
||||
// IsCompleted: 用户今日/周期内是否已完成
|
||||
// LastActionTime: 最近一次完成时间
|
||||
type TaskAppListItem struct {
|
||||
Id int64 `json:"id" orm:"id" dc:"任务ID"`
|
||||
TaskType uint `json:"taskType" orm:"task_type" dc:"任务类型:1=首次登录,2=广告,3=发布书籍"`
|
||||
Title string `json:"title" orm:"title" dc:"任务标题"`
|
||||
Description string `json:"description" orm:"description" dc:"任务描述"`
|
||||
RewardPoints uint `json:"rewardPoints" orm:"reward_points" dc:"完成任务奖励的积分数"`
|
||||
DailyLimit uint `json:"dailyLimit" orm:"daily_limit" dc:"每天可参与次数,NULL 表示不限"`
|
||||
LimitType int `json:"limitType" orm:"limit_type" dc:"限制类型:1=不限,2=每日,3=每周,4=仅一次"`
|
||||
Status int `json:"status" orm:"status" dc:"状态:1=启用,2=禁用"`
|
||||
StartTime *gtime.Time `json:"startTime" orm:"start_time" dc:"任务开始时间"`
|
||||
EndTime *gtime.Time `json:"endTime" orm:"end_time" dc:"任务结束时间"`
|
||||
CompletedCount int `json:"completedCount" orm:"-" dc:"用户已完成次数"`
|
||||
IsCompleted bool `json:"isCompleted" orm:"-" dc:"是否已完成"`
|
||||
LastActionTime *gtime.Time `json:"lastActionTime" orm:"-" dc:"最近完成时间"`
|
||||
}
|
||||
|
||||
type TaskAppListOut struct {
|
||||
List []TaskAppListItem `json:"list"`
|
||||
}
|
||||
|
||||
// App端任务列表查询参数
|
||||
type TaskAppListIn struct {
|
||||
UserId int64 `json:"userId" dc:"用户ID"`
|
||||
}
|
||||
|
||||
// 简化的任务列表项,只包含任务类型和奖励积分
|
||||
type TaskSimpleItem struct {
|
||||
TaskType uint `json:"taskType" orm:"task_type" dc:"任务类型:1=首次登录,2=广告,3=发布书籍"`
|
||||
RewardPoints uint `json:"rewardPoints" orm:"reward_points" dc:"完成任务奖励的积分数"`
|
||||
}
|
||||
|
||||
type TaskSimpleListOut struct {
|
||||
List []TaskSimpleItem `json:"list"`
|
||||
}
|
||||
@ -1 +1,16 @@
|
||||
package model
|
||||
|
||||
import (
|
||||
"github.com/gogf/gf/v2/net/ghttp"
|
||||
)
|
||||
|
||||
// 上传图片输入结构体
|
||||
// File: 上传的文件,Type: 图片类型或业务类型
|
||||
type UploadImageIn struct {
|
||||
File *ghttp.UploadFile `json:"file" dc:"上传的文件"`
|
||||
Type string `json:"type" dc:"图片类型或业务类型"`
|
||||
}
|
||||
|
||||
type UploadImageOut struct {
|
||||
ImageUrl string
|
||||
}
|
||||
|
||||
@ -3,11 +3,13 @@ package model
|
||||
import "github.com/gogf/gf/v2/frame/g"
|
||||
|
||||
type User struct {
|
||||
g.Meta `orm:"table:users"`
|
||||
Id int64 `json:"id" orm:"id"`
|
||||
Email string `json:"email" orm:"email"`
|
||||
Username string `json:"username" orm:"username"`
|
||||
Avatar string `json:"avatar" orm:"avatar"`
|
||||
g.Meta `orm:"table:users"`
|
||||
Id int64 `json:"id" orm:"id"`
|
||||
Email string `json:"email" orm:"email"`
|
||||
Username string `json:"username" orm:"username"`
|
||||
Avatar string `json:"avatar" orm:"avatar"`
|
||||
AttentionCount int `json:"attentionCount" orm:"attention_count"`
|
||||
BackGroundUrl string `json:"backgroundUrl" orm:"background_url"`
|
||||
}
|
||||
type AppUser struct {
|
||||
g.Meta `orm:"table:users"`
|
||||
@ -38,11 +40,15 @@ type UserInfoIn struct {
|
||||
}
|
||||
|
||||
type UserInfoOut struct {
|
||||
UserId int64 // 用户ID
|
||||
Username string // 用户名
|
||||
Email string // 邮箱
|
||||
Points uint64 // 积分
|
||||
Avatar string // 头像
|
||||
Id int64 // 用户ID
|
||||
Username string // 用户名
|
||||
Email string // 邮箱
|
||||
Points uint64 // 积分
|
||||
Avatar string // 头像
|
||||
BackgroundUrl string // 背景图片
|
||||
AttentionCount int // 关注数
|
||||
IsAuthor bool // 是否是作者
|
||||
AuthorStatus int // 作者申请状态(0无,1通过,2禁用,3拒绝,2/3为未通过)
|
||||
}
|
||||
|
||||
type UserDeleteIn struct {
|
||||
|
||||
12
internal/model/user_chapter_purchases.go
Normal file
12
internal/model/user_chapter_purchases.go
Normal file
@ -0,0 +1,12 @@
|
||||
package model
|
||||
|
||||
import "github.com/gogf/gf/v2/os/gtime"
|
||||
|
||||
type UserChapterPurchase struct {
|
||||
Id int64 `json:"id" orm:"id" description:"购买记录ID"`
|
||||
UserId int64 `json:"userId" orm:"user_id" description:"用户ID"`
|
||||
BookId int64 `json:"bookId" orm:"book_id" description:"小说ID"`
|
||||
ChapterId int64 `json:"chapterId" orm:"chapter_id" description:"章节ID"`
|
||||
PointsUsed int `json:"pointsUsed" orm:"points_used" description:"消耗积分数"`
|
||||
PurchaseTime *gtime.Time `json:"purchaseTime" orm:"purchase_time" description:"购买时间"`
|
||||
}
|
||||
13
internal/model/user_points_logs.go
Normal file
13
internal/model/user_points_logs.go
Normal file
@ -0,0 +1,13 @@
|
||||
package model
|
||||
|
||||
import "github.com/gogf/gf/v2/os/gtime"
|
||||
|
||||
type UserPointsLog struct {
|
||||
Id int64 `json:"id" orm:"id" description:"积分流水ID"`
|
||||
UserId int64 `json:"userId" orm:"user_id" description:"用户ID"`
|
||||
ChangeType int `json:"changeType" orm:"change_type" description:"变动类型,1=消费(spend), 2=收入(earn)"`
|
||||
PointsChange int `json:"pointsChange" orm:"points_change" description:"积分变化数,正数增加,负数减少"`
|
||||
RelatedOrderId int64 `json:"relatedOrderId" orm:"related_order_id" description:"关联ID"`
|
||||
Description string `json:"description" orm:"description" description:"变动说明"`
|
||||
CreatedAt *gtime.Time `json:"createdAt" orm:"created_at" description:"变动时间"`
|
||||
}
|
||||
14
internal/model/user_sign_in_logs.go
Normal file
14
internal/model/user_sign_in_logs.go
Normal file
@ -0,0 +1,14 @@
|
||||
package model
|
||||
|
||||
import "github.com/gogf/gf/v2/os/gtime"
|
||||
|
||||
type UserSignInLogSignIn struct {
|
||||
UserId int64 `json:"userId"`
|
||||
RuleId int64 `json:"ruleId"`
|
||||
RewardDetailId int64 `json:"rewardDetailId"`
|
||||
SignInDate *gtime.Time `json:"signInDate"`
|
||||
}
|
||||
|
||||
type UserSignInLogSignOut struct {
|
||||
Success bool `json:"success"`
|
||||
}
|
||||
Reference in New Issue
Block a user