完善功能
This commit is contained in:
@ -10,21 +10,23 @@ import (
|
||||
|
||||
// Books is the golang structure for table books.
|
||||
type Books struct {
|
||||
Id int64 `json:"id" orm:"id" description:"小说ID"` // 小说ID
|
||||
AuthorId int64 `json:"authorId" orm:"author_id" description:"作者ID"` // 作者ID
|
||||
CategoryId int64 `json:"categoryId" orm:"category_id" description:"分类ID"` // 分类ID
|
||||
Title string `json:"title" orm:"title" description:"小说标题"` // 小说标题
|
||||
CoverUrl string `json:"coverUrl" orm:"cover_url" description:"封面图片URL"` // 封面图片URL
|
||||
Description string `json:"description" orm:"description" description:"小说简介"` // 小说简介
|
||||
Status int `json:"status" orm:"status" description:"状态:1=连载中,2=完结,3=下架"` // 状态:1=连载中,2=完结,3=下架
|
||||
WordsCount int `json:"wordsCount" orm:"words_count" description:"字数"` // 字数
|
||||
ChaptersCount int `json:"chaptersCount" orm:"chapters_count" description:"章节数"` // 章节数
|
||||
LatestChapterId int64 `json:"latestChapterId" orm:"latest_chapter_id" description:"最新章节ID"` // 最新章节ID
|
||||
Rating float64 `json:"rating" orm:"rating" description:"评分(0.00~10.00)"` // 评分(0.00~10.00)
|
||||
ReadCount int64 `json:"readCount" orm:"read_count" description:"阅读人数"` // 阅读人数
|
||||
Tags string `json:"tags" orm:"tags" 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:"软删除时间戳"` // 软删除时间戳
|
||||
IsRecommended int `json:"isRecommended" orm:"is_recommended" description:"是否推荐:0=否,1=是"` // 是否推荐:0=否,1=是
|
||||
Id int64 `json:"id" orm:"id" description:"小说ID"` // 小说ID
|
||||
AuthorId int64 `json:"authorId" orm:"author_id" description:"作者ID"` // 作者ID
|
||||
CategoryId int64 `json:"categoryId" orm:"category_id" description:"分类ID"` // 分类ID
|
||||
Title string `json:"title" orm:"title" description:"小说标题"` // 小说标题
|
||||
CoverUrl string `json:"coverUrl" orm:"cover_url" description:"封面图片URL"` // 封面图片URL
|
||||
Description string `json:"description" orm:"description" description:"小说简介"` // 小说简介
|
||||
Status int `json:"status" orm:"status" description:"状态:1=连载中,2=完结,3=下架"` // 状态:1=连载中,2=完结,3=下架
|
||||
WordsCount int `json:"wordsCount" orm:"words_count" description:"字数"` // 字数
|
||||
ChaptersCount int `json:"chaptersCount" orm:"chapters_count" description:"章节数"` // 章节数
|
||||
Rating float64 `json:"rating" orm:"rating" description:"评分(0.00~10.00)"` // 评分(0.00~10.00)
|
||||
ReadCount int64 `json:"readCount" orm:"read_count" description:"阅读人数"` // 阅读人数
|
||||
CurrentReaders int64 `json:"currentReaders" orm:"current_readers" description:"在读人数"` // 在读人数
|
||||
Tags string `json:"tags" orm:"tags" 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:"软删除时间戳"` // 软删除时间戳
|
||||
IsRecommended int `json:"isRecommended" orm:"is_recommended" description:"是否推荐:0=否,1=是"` // 是否推荐:0=否,1=是
|
||||
IsFeatured int `json:"isFeatured" orm:"is_featured" description:"是否精选:0=否,1=是"` // 是否精选:0=否,1=是
|
||||
Language string `json:"language" orm:"language" description:"语言,如 zh=中文,en=英文,jp=日文"` // 语言,如 zh=中文,en=英文,jp=日文
|
||||
}
|
||||
|
||||
@ -10,11 +10,12 @@ import (
|
||||
|
||||
// Bookshelves is the golang structure for table bookshelves.
|
||||
type Bookshelves struct {
|
||||
Id int64 `json:"id" orm:"id" description:"记录ID"` // 记录ID
|
||||
UserId int64 `json:"userId" orm:"user_id" description:"用户ID"` // 用户ID
|
||||
BookId int64 `json:"bookId" orm:"book_id" description:"小说ID"` // 小说ID
|
||||
AddedAt *gtime.Time `json:"addedAt" orm:"added_at" description:"加入书架时间"` // 加入书架时间
|
||||
LastReadChapterId int64 `json:"lastReadChapterId" orm:"last_read_chapter_id" description:"最后阅读章节ID"` // 最后阅读章节ID
|
||||
LastReadPercent float64 `json:"lastReadPercent" orm:"last_read_percent" description:"阅读进度百分比(0.00~100.00)"` // 阅读进度百分比(0.00~100.00)
|
||||
LastReadAt *gtime.Time `json:"lastReadAt" orm:"last_read_at" description:"最后阅读时间"` // 最后阅读时间
|
||||
Id int64 `json:"id" orm:"id" description:"记录ID"` // 记录ID
|
||||
UserId int64 `json:"userId" orm:"user_id" description:"用户ID"` // 用户ID
|
||||
BookId int64 `json:"bookId" orm:"book_id" description:"小说ID"` // 小说ID
|
||||
AddedAt *gtime.Time `json:"addedAt" orm:"added_at" description:"加入书架时间"` // 加入书架时间
|
||||
LastReadChapterId int64 `json:"lastReadChapterId" orm:"last_read_chapter_id" description:"最后阅读章节ID"` // 最后阅读章节ID
|
||||
LastReadPercent float64 `json:"lastReadPercent" orm:"last_read_percent" description:"阅读进度百分比(0.00~100.00)"` // 阅读进度百分比(0.00~100.00)
|
||||
LastReadAt *gtime.Time `json:"lastReadAt" orm:"last_read_at" description:"最后阅读时间"` // 最后阅读时间
|
||||
ReadStatus int `json:"readStatus" orm:"read_status" description:"阅读状态:1=正在读,2=已读完,3=已收藏"` // 阅读状态:1=正在读,2=已读完,3=已收藏
|
||||
}
|
||||
|
||||
@ -10,10 +10,10 @@ import (
|
||||
|
||||
// Categories is the golang structure for table categories.
|
||||
type Categories struct {
|
||||
Id int64 `json:"id" orm:"id" description:"分类ID"` // 分类ID
|
||||
Name string `json:"name" orm:"name" description:"分类名称"` // 分类名称
|
||||
Type int `json:"type" orm:"type" 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
|
||||
Name string `json:"name" orm:"name" 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:"软删除时间戳"` // 软删除时间戳
|
||||
Channel int `json:"channel" orm:"channel" description:"频道类型:1=男频,2=女频"` // 频道类型:1=男频,2=女频
|
||||
}
|
||||
|
||||
@ -10,11 +10,11 @@ import (
|
||||
|
||||
// UserPointsLogs is the golang structure for table user_points_logs.
|
||||
type UserPointsLogs struct {
|
||||
Id int64 `json:"id" orm:"id" description:"积分流水ID"` // 积分流水ID
|
||||
UserId int64 `json:"userId" orm:"user_id" description:"用户ID"` // 用户ID
|
||||
ChangeType string `json:"changeType" orm:"change_type" description:"变动类型,例如 earn、spend、refund 等"` // 变动类型,例如 earn、spend、refund 等
|
||||
PointsChange int `json:"pointsChange" orm:"points_change" description:"积分变化数,正数增加,负数减少"` // 积分变化数,正数增加,负数减少
|
||||
RelatedOrderId int64 `json:"relatedOrderId" orm:"related_order_id" description:"关联订单ID"` // 关联订单ID
|
||||
Description string `json:"description" orm:"description" description:"变动说明"` // 变动说明
|
||||
CreatedAt *gtime.Time `json:"createdAt" orm:"created_at" description:"变动时间"` // 变动时间
|
||||
Id int64 `json:"id" orm:"id" description:"积分流水ID"` // 积分流水ID
|
||||
UserId int64 `json:"userId" orm:"user_id" description:"用户ID"` // 用户ID
|
||||
ChangeType int `json:"changeType" orm:"change_type" description:"变动类型,1=消费(spend), 2=收入(earn)"` // 变动类型,1=消费(spend), 2=收入(earn)
|
||||
PointsChange int `json:"pointsChange" orm:"points_change" description:"积分变化数,正数增加,负数减少"` // 积分变化数,正数增加,负数减少
|
||||
RelatedOrderId int64 `json:"relatedOrderId" orm:"related_order_id" description:"关联ID:当change_type=1时,为chapter_purchases.id;当change_type=2时,为advertisement_records.id"` // 关联ID:当change_type=1时,为chapter_purchases.id;当change_type=2时,为advertisement_records.id
|
||||
Description string `json:"description" orm:"description" description:"变动说明"` // 变动说明
|
||||
CreatedAt *gtime.Time `json:"createdAt" orm:"created_at" description:"变动时间"` // 变动时间
|
||||
}
|
||||
|
||||
@ -8,11 +8,11 @@ import (
|
||||
"github.com/gogf/gf/v2/os/gtime"
|
||||
)
|
||||
|
||||
// ReadRecords is the golang structure for table read_records.
|
||||
type ReadRecords struct {
|
||||
Id int64 `json:"id" orm:"id" description:"记录ID"` // 记录ID
|
||||
UserId int64 `json:"userId" orm:"user_id" description:"用户ID"` // 用户ID
|
||||
BookId int64 `json:"bookId" orm:"book_id" description:"小说ID"` // 小说ID
|
||||
ChapterId int64 `json:"chapterId" orm:"chapter_id" description:"章节ID"` // 章节ID
|
||||
ReadAt *gtime.Time `json:"readAt" orm:"read_at" description:"阅读时间"` // 阅读时间
|
||||
// UserReadHistory is the golang structure for table user_read_history.
|
||||
type UserReadHistory struct {
|
||||
Id int64 `json:"id" orm:"id" description:"历史记录ID"` // 历史记录ID
|
||||
UserId int64 `json:"userId" orm:"user_id" description:"用户ID"` // 用户ID
|
||||
BookId int64 `json:"bookId" orm:"book_id" description:"小说ID"` // 小说ID
|
||||
ChapterId int64 `json:"chapterId" orm:"chapter_id" description:"最后阅读章节ID"` // 最后阅读章节ID
|
||||
ReadAt *gtime.Time `json:"readAt" orm:"read_at" description:"最后阅读时间"` // 最后阅读时间
|
||||
}
|
||||
21
internal/model/entity/user_read_records.go
Normal file
21
internal/model/entity/user_read_records.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"
|
||||
)
|
||||
|
||||
// UserReadRecords is the golang structure for table user_read_records.
|
||||
type UserReadRecords struct {
|
||||
Id int64 `json:"id" orm:"id" description:"记录ID"` // 记录ID
|
||||
UserId int64 `json:"userId" orm:"user_id" description:"用户ID"` // 用户ID
|
||||
BookId int64 `json:"bookId" orm:"book_id" description:"小说ID"` // 小说ID
|
||||
ChapterId int64 `json:"chapterId" orm:"chapter_id" description:"章节ID"` // 章节ID
|
||||
Progress int `json:"progress" orm:"progress" description:"阅读进度百分比(0-100)"` // 阅读进度百分比(0-100)
|
||||
ReadAt *gtime.Time `json:"readAt" orm:"read_at" description:"阅读时间"` // 阅读时间
|
||||
CreatedAt *gtime.Time `json:"createdAt" orm:"created_at" description:"创建时间"` // 创建时间
|
||||
UpdatedAt *gtime.Time `json:"updatedAt" orm:"updated_at" description:"更新时间"` // 更新时间
|
||||
}
|
||||
Reference in New Issue
Block a user