初始化项目框架,完成部分接口开发
This commit is contained in:
19
internal/model/entity/admins.go
Normal file
19
internal/model/entity/admins.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"
|
||||
)
|
||||
|
||||
// Admins is the golang structure for table admins.
|
||||
type Admins 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:"密码哈希"` // 密码哈希
|
||||
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:"软删除时间戳"` // 软删除时间戳
|
||||
}
|
||||
21
internal/model/entity/authors.go
Normal file
21
internal/model/entity/authors.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"
|
||||
)
|
||||
|
||||
// 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:"软删除时间戳"` // 软删除时间戳
|
||||
}
|
||||
19
internal/model/entity/book_ratings.go
Normal file
19
internal/model/entity/book_ratings.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"
|
||||
)
|
||||
|
||||
// BookRatings is the golang structure for table book_ratings.
|
||||
type BookRatings 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
|
||||
Score float64 `json:"score" orm:"score" description:"评分(0~10)"` // 评分(0~10)
|
||||
Comment string `json:"comment" orm:"comment" description:"用户评论"` // 用户评论
|
||||
CreatedAt *gtime.Time `json:"createdAt" orm:"created_at" description:"创建时间"` // 创建时间
|
||||
}
|
||||
30
internal/model/entity/books.go
Normal file
30
internal/model/entity/books.go
Normal file
@ -0,0 +1,30 @@
|
||||
// =================================================================================
|
||||
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
|
||||
// =================================================================================
|
||||
|
||||
package entity
|
||||
|
||||
import (
|
||||
"github.com/gogf/gf/v2/os/gtime"
|
||||
)
|
||||
|
||||
// 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=是
|
||||
}
|
||||
20
internal/model/entity/bookshelves.go
Normal file
20
internal/model/entity/bookshelves.go
Normal file
@ -0,0 +1,20 @@
|
||||
// =================================================================================
|
||||
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
|
||||
// =================================================================================
|
||||
|
||||
package entity
|
||||
|
||||
import (
|
||||
"github.com/gogf/gf/v2/os/gtime"
|
||||
)
|
||||
|
||||
// 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:"最后阅读时间"` // 最后阅读时间
|
||||
}
|
||||
19
internal/model/entity/categories.go
Normal file
19
internal/model/entity/categories.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"
|
||||
)
|
||||
|
||||
// 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:"软删除时间戳"` // 软删除时间戳
|
||||
}
|
||||
24
internal/model/entity/chapters.go
Normal file
24
internal/model/entity/chapters.go
Normal file
@ -0,0 +1,24 @@
|
||||
// =================================================================================
|
||||
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
|
||||
// =================================================================================
|
||||
|
||||
package entity
|
||||
|
||||
import (
|
||||
"github.com/gogf/gf/v2/os/gtime"
|
||||
)
|
||||
|
||||
// Chapters is the golang structure for table chapters.
|
||||
type Chapters struct {
|
||||
Id int64 `json:"id" orm:"id" description:"章节ID"` // 章节ID
|
||||
BookId int64 `json:"bookId" orm:"book_id" description:"小说ID"` // 小说ID
|
||||
Title string `json:"title" orm:"title" description:"章节标题"` // 章节标题
|
||||
Content string `json:"content" orm:"content" description:"章节内容"` // 章节内容
|
||||
WordCount int `json:"wordCount" orm:"word_count" description:"章节字数"` // 章节字数
|
||||
Sort int `json:"sort" orm:"sort" description:"排序序号"` // 排序序号
|
||||
IsLocked int `json:"isLocked" orm:"is_locked" description:"是否锁定:0=免费,1=需积分解锁"` // 是否锁定:0=免费,1=需积分解锁
|
||||
RequiredScore int `json:"requiredScore" orm:"required_score" 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/feedbacks.go
Normal file
19
internal/model/entity/feedbacks.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"
|
||||
)
|
||||
|
||||
// Feedbacks is the golang structure for table feedbacks.
|
||||
type Feedbacks struct {
|
||||
Id int64 `json:"id" orm:"id" description:"反馈ID"` // 反馈ID
|
||||
UserId int64 `json:"userId" orm:"user_id" description:"用户ID"` // 用户ID
|
||||
Content string `json:"content" orm:"content" 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:"更新时间"` // 更新时间
|
||||
}
|
||||
18
internal/model/entity/read_records.go
Normal file
18
internal/model/entity/read_records.go
Normal file
@ -0,0 +1,18 @@
|
||||
// =================================================================================
|
||||
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
|
||||
// =================================================================================
|
||||
|
||||
package entity
|
||||
|
||||
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:"阅读时间"` // 阅读时间
|
||||
}
|
||||
19
internal/model/entity/tags.go
Normal file
19
internal/model/entity/tags.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"
|
||||
)
|
||||
|
||||
// Tags is the golang structure for table tags.
|
||||
type Tags 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=角色, 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:"软删除时间戳"` // 软删除时间戳
|
||||
}
|
||||
19
internal/model/entity/user_chapter_purchases.go
Normal file
19
internal/model/entity/user_chapter_purchases.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"
|
||||
)
|
||||
|
||||
// UserChapterPurchases is the golang structure for table user_chapter_purchases.
|
||||
type UserChapterPurchases 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
|
||||
PointsUsed int `json:"pointsUsed" orm:"points_used" description:"消耗积分数"` // 消耗积分数
|
||||
PurchaseTime *gtime.Time `json:"purchaseTime" orm:"purchase_time" description:"购买时间"` // 购买时间
|
||||
}
|
||||
17
internal/model/entity/user_follow_authors.go
Normal file
17
internal/model/entity/user_follow_authors.go
Normal file
@ -0,0 +1,17 @@
|
||||
// =================================================================================
|
||||
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
|
||||
// =================================================================================
|
||||
|
||||
package entity
|
||||
|
||||
import (
|
||||
"github.com/gogf/gf/v2/os/gtime"
|
||||
)
|
||||
|
||||
// UserFollowAuthors is the golang structure for table user_follow_authors.
|
||||
type UserFollowAuthors struct {
|
||||
Id int64 `json:"id" orm:"id" description:"关注ID"` // 关注ID
|
||||
UserId int64 `json:"userId" orm:"user_id" description:"用户ID"` // 用户ID
|
||||
AuthorId int64 `json:"authorId" orm:"author_id" description:"作者ID"` // 作者ID
|
||||
FollowedAt *gtime.Time `json:"followedAt" orm:"followed_at" description:"关注时间"` // 关注时间
|
||||
}
|
||||
17
internal/model/entity/user_points.go
Normal file
17
internal/model/entity/user_points.go
Normal file
@ -0,0 +1,17 @@
|
||||
// =================================================================================
|
||||
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
|
||||
// =================================================================================
|
||||
|
||||
package entity
|
||||
|
||||
import (
|
||||
"github.com/gogf/gf/v2/os/gtime"
|
||||
)
|
||||
|
||||
// UserPoints is the golang structure for table user_points.
|
||||
type UserPoints struct {
|
||||
Id int64 `json:"id" orm:"id" description:"积分账户ID"` // 积分账户ID
|
||||
UserId int64 `json:"userId" orm:"user_id" description:"用户ID"` // 用户ID
|
||||
PointsBalance int `json:"pointsBalance" orm:"points_balance" description:"当前积分余额"` // 当前积分余额
|
||||
UpdatedAt *gtime.Time `json:"updatedAt" orm:"updated_at" description:"更新时间"` // 更新时间
|
||||
}
|
||||
20
internal/model/entity/user_points_logs.go
Normal file
20
internal/model/entity/user_points_logs.go
Normal file
@ -0,0 +1,20 @@
|
||||
// =================================================================================
|
||||
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
|
||||
// =================================================================================
|
||||
|
||||
package entity
|
||||
|
||||
import (
|
||||
"github.com/gogf/gf/v2/os/gtime"
|
||||
)
|
||||
|
||||
// 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:"变动时间"` // 变动时间
|
||||
}
|
||||
22
internal/model/entity/users.go
Normal file
22
internal/model/entity/users.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"
|
||||
)
|
||||
|
||||
// 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:"软删除时间戳"` // 软删除时间戳
|
||||
}
|
||||
Reference in New Issue
Block a user