package book

type BookAuthorRelation struct {
	HardDeleteModel
	BookID     uint `json:"bookId" form:"bookId" gorm:"not null;uniqueIndex:uk_book_author_relation_book_id_author_id;index:idx_book_author_relation_book_id_author_sort;comment:书籍 ID"`
	AuthorID   uint `json:"authorId" form:"authorId" gorm:"not null;uniqueIndex:uk_book_author_relation_book_id_author_id;index;comment:作者 ID"`
	AuthorSort int  `json:"authorSort" form:"authorSort" gorm:"not null;default:1;index:idx_book_author_relation_book_id_author_sort;comment:作者展示排序"`
}

func (BookAuthorRelation) TableName() string {
	return "book_author_relation"
}
