feat: add knowledge directory management for documents and FAQs

- Implemented directory validation in Create and Update knowledge document services.
- Added directory selection in document and FAQ edit dialogs with a new KnowledgeDirectoryPanel component.
- Enhanced API to support fetching, creating, updating, and deleting knowledge directories.
- Updated data models to include directory information for knowledge documents and FAQs.
- Added translations for directory-related messages in English and Chinese.
This commit is contained in:
mlogclub
2026-06-02 15:37:50 +08:00
parent 32af090ab8
commit 853ae71b3d
26 changed files with 1442 additions and 19 deletions
@@ -46,6 +46,10 @@ func (r *knowledgeFAQRepository) FindPageByParams(db *gorm.DB, queryParams *para
return r.FindPageByCnd(db, &queryParams.Cnd)
}
func (r *knowledgeFAQRepository) Count(db *gorm.DB, cnd *sqls.Cnd) int64 {
return cnd.Count(db, &models.KnowledgeFAQ{})
}
func (r *knowledgeFAQRepository) Create(db *gorm.DB, t *models.KnowledgeFAQ) error {
return db.Create(t).Error
}