Skip to content

RAGFlow is an agent-native database: a Retrieval-Augmented Generation (RAG) engine that grew into context infrastructure.

GO CLI: modify enterprise dao functions (#17812)

maoyifeng47a4ab1c4534
diff --git a/internal/admin/service.go b/internal/admin/service.go
index 536f0b0c13..50aa110c77 100644
--- a/internal/admin/service.go
+++ b/internal/admin/service.go
@@ -65,20 +65,10 @@ type Service struct {
ingestionTaskLogDao *dao.IngestionTaskLogDAO
ingestionTaskSvc *servicepkg.IngestionTaskService
- enterpriseUserDAO *dao.EnterpriseUserDAO
- enterpriseTaskDAO *dao.EnterpriseTaskDAO
- enterpriseFileDAO *dao.EnterpriseFileDAO
- enterpriseAPITokenDAO *dao.EnterpriseAPITokenDAO
- enterpriseBillingProductDAO *dao.EnterpriseBillingProductDAO
- enterpriseBillingSubscriptionDAO *dao.EnterpriseBillingSubscriptionDAO
- enterpriseChatDAO *dao.EnterpriseChatDAO
- enterpriseDocumentDAO *dao.EnterpriseDocumentDAO
- enterpriseMemoryDAO *dao.EnterpriseMemoryDAO
- enterpriseSearchDAO *dao.EnterpriseSearchDAO
- enterpriseTenantDAO *dao.EnterpriseTenantDAO
- enterpriseUserCanvasDAO *dao.EnterpriseUserCanvasDAO
- enterpriseUserTenantDAO *dao.EnterpriseUserTenantDAO
- enterpriseKnowledgebaseDAO *dao.EnterpriseKnowledgebaseDAO
+ BillingProductDAO *dao.BillingProductDAO
+ BillingSubscriptionDAO *dao.BillingSubscriptionDAO
+ MemoryDAO *dao.MemoryDAO
+ SearchDAO *dao.SearchDAO
}
// NewService create admin service
@@ -105,20 +95,10 @@ func NewService() *Service {
ingestionTaskLogDao: dao.NewIngestionTaskLogDAO(),
ingestionTaskSvc: servicepkg.NewIngestionTaskService(),
- enterpriseUserDAO: dao.NewEnterpriseUserDAO(),
- enterpriseTaskDAO: dao.NewEnterpriseTaskDAO(),
- enterpriseFileDAO: dao.NewEnterpriseFileDAO(),
- enterpriseAPITokenDAO: dao.NewEnterpriseAPITokenDAO(),
- enterpriseBillingProductDAO: dao.NewEnterpriseBillingProductDAO(),
- enterpriseBillingSubscriptionDAO: dao.NewEnterpriseBillingSubscriptionDAO(),
- enterpriseChatDAO: dao.NewEnterpriseChatDAO(),
- enterpriseDocumentDAO: dao.NewEnterpriseDocumentDAO(),
- enterpriseMemoryDAO: dao.NewEnterpriseMemoryDAO(),
- enterpriseSearchDAO: dao.NewEnterpriseSearchDAO(),
- enterpriseTenantDAO: dao.NewEnterpriseTenantDAO(),
- enterpriseUserCanvasDAO: dao.NewEnterpriseUserCanvasDAO(),
- enterpriseUserTenantDAO: dao.NewEnterpriseUserTenantDAO(),
- enterpriseKnowledgebaseDAO: dao.NewEnterpriseKnowledgebaseDAO(),
+ BillingProductDAO: dao.NewBillingProductDAO(),
+ BillingSubscriptionDAO: dao.NewBillingSubscriptionDAO(),
+ MemoryDAO: dao.NewMemoryDAO(),
+ SearchDAO: dao.NewSearchDAO(),
}
}
diff --git a/internal/dao/api_token_ee.go b/internal/dao/api_token_ee.go
index e6ce3cb316..0e180b9abc 100644
--- a/internal/dao/api_token_ee.go
+++ b/internal/dao/api_token_ee.go
@@ -15,9 +15,3 @@
//
package dao
-
-type EnterpriseAPITokenDAO struct{}
-
-func NewEnterpriseAPITokenDAO() *EnterpriseAPITokenDAO {
- return &EnterpriseAPITokenDAO{}
-}
diff --git a/internal/dao/billing_product_ee.go b/internal/dao/billing_product_ee.go
index 666dd62782..055c7e8e6a 100644
--- a/internal/dao/billing_product_ee.go
+++ b/internal/dao/billing_product_ee.go
@@ -16,8 +16,8 @@
package dao
-type EnterpriseBillingProductDAO struct{}
+type BillingProductDAO struct{}
-func NewEnterpriseBillingProductDAO() *EnterpriseBillingProductDAO {
- return &EnterpriseBillingProductDAO{}
+func NewBillingProductDAO() *BillingProductDAO {
+ return &BillingProductDAO{}
}
diff --git a/internal/dao/billing_subscription_ee.go b/internal/dao/billing_subscription_ee.go
index 180a85d0c0..b63ecc4d30 100644
--- a/internal/dao/billing_subscription_ee.go
+++ b/internal/dao/billing_subscription_ee.go
@@ -16,8 +16,8 @@
package dao
-type EnterpriseBillingSubscriptionDAO struct{}
+type BillingSubscriptionDAO struct{}
-func NewEnterpriseBillingSubscriptionDAO() *EnterpriseBillingSubscriptionDAO {
- return &EnterpriseBillingSubscriptionDAO{}
+func NewBillingSubscriptionDAO() *BillingSubscriptionDAO {
+ return &BillingSubscriptionDAO{}
}
diff --git a/internal/dao/chat_ee.go b/internal/dao/chat_ee.go
index 34b4f6a80b..0e180b9abc 100644
--- a/internal/dao/chat_ee.go
+++ b/internal/dao/chat_ee.go
@@ -15,9 +15,3 @@
//
package dao
-
-type EnterpriseChatDAO struct{}
-
-func NewEnterpriseChatDAO() *EnterpriseChatDAO {
- return &EnterpriseChatDAO{}
-}
diff --git a/internal/dao/document_ee.go b/internal/dao/document_ee.go
index 17ab318b96..0e180b9abc 100644
--- a/internal/dao/document_ee.go
+++ b/internal/dao/document_ee.go
@@ -15,9 +15,3 @@
//
package dao
-
-type EnterpriseDocumentDAO struct{}
-
-func NewEnterpriseDocumentDAO() *EnterpriseDocumentDAO {
- return &EnterpriseDocumentDAO{}
-}
diff --git a/internal/dao/file_ee.go b/internal/dao/file_ee.go
index 9c4e920b62..0e180b9abc 100644
--- a/internal/dao/file_ee.go
+++ b/internal/dao/file_ee.go
@@ -15,9 +15,3 @@
//
package dao
-
-type EnterpriseFileDAO struct{}
-
-func NewEnterpriseFileDAO() *EnterpriseFileDAO {
- return &EnterpriseFileDAO{}
-}
diff --git a/internal/dao/kb_ee.go b/internal/dao/kb_ee.go
index 8f20e22c65..0e180b9abc 100644
--- a/internal/dao/kb_ee.go
+++ b/internal/dao/kb_ee.go
@@ -15,9 +15,3 @@
//
package dao
-
-type EnterpriseKnowledgebaseDAO struct{}
-
-func NewEnterpriseKnowledgebaseDAO() *EnterpriseKnowledgebaseDAO {
- return &EnterpriseKnowledgebaseDAO{}
-}
diff --git a/internal/dao/memory_ee.go b/internal/dao/memory_ee.go
index 2d1616406a..0e180b9abc 100644
--- a/internal/dao/memory_ee.go
+++ b/internal/dao/memory_ee.go
@@ -15,9 +15,3 @@
//
package dao
-
-type EnterpriseMemoryDAO struct{}
-
-func NewEnterpriseMemoryDAO() *EnterpriseMemoryDAO {
- return &EnterpriseMemoryDAO{}
-}
diff --git a/internal/dao/search_ee.go b/internal/dao/search_ee.go
index 51dfa6291b..0e180b9abc 100644
--- a/internal/dao/search_ee.go
+++ b/internal/dao/search_ee.go
@@ -15,9 +15,3 @@
//
package dao
-
-type EnterpriseSearchDAO struct{}
-
-func NewEnterpriseSearchDAO() *EnterpriseSearchDAO {
- return &EnterpriseSearchDAO{}
-}
diff --git a/internal/dao/task_ee.go b/internal/dao/task_ee.go
index 65789bcf7a..0e180b9abc 100644
--- a/internal/dao/task_ee.go
+++ b/internal/dao/task_ee.go
@@ -15,9 +15,3 @@
//
package dao
-
-type EnterpriseTaskDAO struct{}
-
-func NewEnterpriseTaskDAO() *EnterpriseTaskDAO {
- return &EnterpriseTaskDAO{}
-}
diff --git a/internal/dao/tenant_ee.go b/internal/dao/tenant_ee.go
index ff35cc173e..0e180b9abc 100644
--- a/internal/dao/tenant_ee.go
+++ b/internal/dao/tenant_ee.go
@@ -15,9 +15,3 @@
//
package dao
-
-type EnterpriseTenantDAO struct{}
-
-func NewEnterpriseTenantDAO() *EnterpriseTenantDAO {
- return &EnterpriseTenantDAO{}
-}
diff --git a/internal/dao/user_canvas_ee.go b/internal/dao/user_canvas_ee.go
index d7b65042b8..0e180b9abc 100644
--- a/internal/dao/user_canvas_ee.go
+++ b/internal/dao/user_canvas_ee.go
@@ -15,9 +15,3 @@
//
package dao
-
-type EnterpriseUserCanvasDAO struct{}
-
-func NewEnterpriseUserCanvasDAO() *EnterpriseUserCanvasDAO {
- return &EnterpriseUserCanvasDAO{}
-}
diff --git a/internal/dao/user_ee.go b/internal/dao/user_ee.go
index 52c979cdba..0e180b9abc 100644
--- a/internal/dao/user_ee.go
+++ b/internal/dao/user_ee.go
@@ -15,9 +15,3 @@
//
package dao
-
-type EnterpriseUserDAO struct{}
-
-func NewEnterpriseUserDAO() *EnterpriseUserDAO {
- return &EnterpriseUserDAO{}
-}
diff --git a/internal/dao/user_tenant_ee.go b/internal/dao/user_tenant_ee.go
index 8143af0bce..0e180b9abc 100644
--- a/internal/dao/user_tenant_ee.go
+++ b/internal/dao/user_tenant_ee.go
@@ -15,9 +15,3 @@
//
package dao
-
-type EnterpriseUserTenantDAO struct{}
-
-func NewEnterpriseUserTenantDAO() *EnterpriseUserTenantDAO {
- return &EnterpriseUserTenantDAO{}
-}