chore: update book enabled status wiring

This commit is contained in:
2026-04-27 11:41:35 +08:00
parent 93bde0a6b6
commit 67c33d06be
25 changed files with 336 additions and 122 deletions

View File

@@ -2,10 +2,10 @@ package book
type BookAuthor struct {
HardDeleteModel
Name string `json:"name" form:"name" gorm:"type:varchar(128);not null;uniqueIndex:uk_book_author_name;comment:作者名称"`
AuthorStatus string `json:"authorStatus" form:"authorStatus" gorm:"type:varchar(32);not null;default:enabled;index;comment:作者启用状态字典值,对应 common_enabled_status"`
Intro string `json:"intro" form:"intro" gorm:"type:text;comment:作者简介"`
CoverUrl string `json:"coverUrl" form:"coverUrl" gorm:"type:varchar(500);comment:作者头像或封面 URL"`
Name string `json:"name" form:"name" gorm:"type:varchar(128);not null;uniqueIndex:uk_book_author_name;comment:作者名称"`
IsEnabled bool `json:"isEnabled" form:"isEnabled" gorm:"not null;default:true;index;comment:作者是否启用"`
Intro string `json:"intro" form:"intro" gorm:"type:text;comment:作者简介"`
CoverUrl string `json:"coverUrl" form:"coverUrl" gorm:"type:varchar(500);comment:作者头像或封面 URL"`
}
func (BookAuthor) TableName() string {