完善功能

This commit is contained in:
2025-07-16 15:16:40 +08:00
parent b2871ec0d2
commit f68a5b360b
123 changed files with 4643 additions and 931 deletions

60
internal/model/author.go Normal file
View File

@ -0,0 +1,60 @@
package model
import "github.com/gogf/gf/v2/frame/g"
type Author 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"`
}
type AuthorListIn struct {
Page int
Size int
PenName string
Status int
}
type AuthorListOut struct {
Total int
List []Author
}
type AuthorAddIn struct {
UserId int64
PenName string
Bio string
Status int
}
type AuthorEditIn struct {
Id int64
PenName string
Bio string
Status int
}
type AuthorDelIn struct {
Id int64
}
type AuthorCRUDOut struct {
Success bool
}
type AuthorApplyIn struct {
PenName string // 笔名
Bio string // 作者简介
}
type AuthorApplyOut struct {
Success bool
}
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"`
}