69 lines
2.5 KiB
Go
69 lines
2.5 KiB
Go
package response
|
|
|
|
import "github.com/flipped-aurora/gin-vue-admin/server/model/book"
|
|
|
|
type BookResponse struct {
|
|
Book book.Book `json:"book"`
|
|
}
|
|
type BookAuthorResponse struct {
|
|
BookAuthor book.BookAuthor `json:"bookAuthor"`
|
|
}
|
|
type BookAuthorListItem struct {
|
|
book.BookAuthor `gorm:"embedded"`
|
|
AuthorName string `json:"authorName" gorm:"column:author_name"`
|
|
}
|
|
type BookAuthorRelationDisplay struct {
|
|
book.BookAuthorRelation `gorm:"embedded"`
|
|
BookTitle string `json:"bookTitle" gorm:"column:book_title"`
|
|
AuthorName string `json:"authorName" gorm:"column:author_name"`
|
|
}
|
|
type BookAuthorRelationResponse struct {
|
|
BookAuthorRelation BookAuthorRelationDisplay `json:"bookAuthorRelation"`
|
|
}
|
|
type BookAuthorRelationListItem = BookAuthorRelationDisplay
|
|
type BookChapterDisplay struct {
|
|
book.BookChapter `gorm:"embedded"`
|
|
BookTitle string `json:"bookTitle" gorm:"column:book_title"`
|
|
}
|
|
type BookChapterResponse struct {
|
|
BookChapter BookChapterDisplay `json:"bookChapter"`
|
|
}
|
|
type BookChapterListItem = BookChapterDisplay
|
|
type BookCommentDisplay struct {
|
|
book.BookComment `gorm:"embedded"`
|
|
BookTitle string `json:"bookTitle" gorm:"column:book_title"`
|
|
ChapterTitle string `json:"chapterTitle" gorm:"column:chapter_title"`
|
|
}
|
|
type BookCommentResponse struct {
|
|
BookComment BookCommentDisplay `json:"bookComment"`
|
|
}
|
|
type BookCommentListItem = BookCommentDisplay
|
|
type BookCommentLikeRecordDisplay struct {
|
|
book.BookCommentLikeRecord `gorm:"embedded"`
|
|
BookTitle string `json:"bookTitle" gorm:"column:book_title"`
|
|
CommentContent string `json:"commentContent" gorm:"column:comment_content"`
|
|
}
|
|
type BookCommentLikeRecordResponse struct {
|
|
BookCommentLikeRecord BookCommentLikeRecordDisplay `json:"bookCommentLikeRecord"`
|
|
}
|
|
type BookCommentLikeRecordListItem = BookCommentLikeRecordDisplay
|
|
type BookFavoriteRecordDisplay struct {
|
|
book.BookFavoriteRecord `gorm:"embedded"`
|
|
BookTitle string `json:"bookTitle" gorm:"column:book_title"`
|
|
}
|
|
type BookFavoriteRecordResponse struct {
|
|
BookFavoriteRecord BookFavoriteRecordDisplay `json:"bookFavoriteRecord"`
|
|
}
|
|
type BookFavoriteRecordListItem = BookFavoriteRecordDisplay
|
|
type BookReadRecordDisplay struct {
|
|
book.BookReadRecord `gorm:"embedded"`
|
|
ChapterTitle string `json:"chapterTitle" gorm:"column:chapter_title"`
|
|
}
|
|
type BookReadRecordResponse struct {
|
|
BookReadRecord BookReadRecordDisplay `json:"bookReadRecord"`
|
|
}
|
|
type BookReadRecordListItem = BookReadRecordDisplay
|
|
type BookSeriesResponse struct {
|
|
BookSeries book.BookSeries `json:"bookSeries"`
|
|
}
|