refactor(documents): rename document tree model

This commit is contained in:
2026-07-24 12:23:18 +08:00
parent 1578c81a89
commit ab8ba3c03f
24 changed files with 77 additions and 77 deletions

View File

@@ -269,7 +269,7 @@ func utcOptionalTime(value *time.Time) *time.Time {
func ensureSharedObjectInProject(tx *gorm.DB, projectID uint, objectID uint) error {
var count int64
if err := tx.Model(&models.SaDocument{}).Where("id = ? AND project_id = ?", objectID, projectID).Count(&count).Error; err != nil {
if err := tx.Model(&models.SaDocumentTree{}).Where("id = ? AND project_id = ?", objectID, projectID).Count(&count).Error; err != nil {
return err
}
if count == 0 {