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"` }